[MM-62973][MM-63028][MM-63034][MM-63027] Various accessibility fixes around Browse Channels modal (#30922)
* [MM-62973] Fix order of Close button and other buttons in the header * [MM-63028] Add aria-live status area when searching for channels * [MM-63027] Add announcement that channel is joined * [MM-63034] Add role=checkbox and reformat HTML to have correct custom checkbox code * Update snapshots from generic_modal change * PR feedback * PR feedback * PR feedback
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c82a24f396
Коммит
883711c72d
@@ -20,12 +20,12 @@ function verifyNoChannelToJoinMessage(isVisible) {
|
||||
function ensureHideJoinedCheckboxEnabled(shouldBeChecked) {
|
||||
cy.get('#hideJoinedPreferenceCheckbox').then(($checkbox) => {
|
||||
cy.wrap($checkbox).findByText('Hide Joined').should('be.visible');
|
||||
cy.wrap($checkbox).find('button').invoke('attr', 'class').then(($classList) => {
|
||||
cy.wrap($checkbox).find('div.get-app__checkbox').invoke('attr', 'class').then(($classList) => {
|
||||
if ($classList.split(' ').includes('checked') ^ shouldBeChecked) {
|
||||
// We click on the button only when the XOR operands do not match
|
||||
// e.g. checkbox is checked, but should not be checked; and vice-versa
|
||||
cy.wrap($checkbox).click();
|
||||
cy.wrap($checkbox).find('button').should(`${shouldBeChecked ? '' : 'not.'}have.class`, 'checked');
|
||||
cy.wrap($checkbox).find('div.get-app__checkbox').should(`${shouldBeChecked ? '' : 'not.'}have.class`, 'checked');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -120,8 +120,8 @@ describe('Verify Accessibility Support in Modals & Dialogs', () => {
|
||||
// # Hide already joined channels
|
||||
cy.findByText('Hide Joined').click();
|
||||
|
||||
// # Focus on the Create Channel button and TAB four time
|
||||
cy.get('#createNewChannelButton').focus().tab().tab().tab().tab();
|
||||
// # Focus on the Create Channel button and TAB five time
|
||||
cy.get('#createNewChannelButton').focus().tab().tab().tab().tab().tab();
|
||||
|
||||
// * Verify channel name is highlighted and reader reads the channel name and channel description
|
||||
cy.get('#moreChannelsList').within(() => {
|
||||
|
||||
Ссылка в новой задаче
Block a user