[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');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Ссылка в новой задаче
Block a user