MM-64669 Fix keyboard navigation of settings sidebar (#32098)

* MM-64669 Fix keyboard navigation of settings sidebar and add Playwright test

* MM-64669 Revert changes to Cypress test which masked keyboard bug

The changes that were previously made caused Cypress to refocus the
sidebar repeatedly which stopped the test from failing without fixing
the bug.

* Ensure focus highlight is always visible on sidebar tabs

This may not have been broken by the changes that caused MM-64669, but I
noticed it while I was in there and wanted to fix it.

* Fix settings modal scrolling while changing sections using arrow keys

* Remove accidentally-added field
Этот коммит содержится в:
Harrison Healey
2025-06-27 14:01:53 -04:00
коммит произвёл GitHub
родитель 62a4ce920e
Коммит 5ffb7607cc
5 изменённых файлов: 91 добавлений и 47 удалений

Просмотреть файл

@@ -89,14 +89,12 @@ describe('Verify Accessibility Support in different sections in Settings and Pro
});
it('MM-T1465_1 Verify Label & Tab behavior in section links', () => {
// * Verify tab selection and keyboard navigation in Account settings modal
// * Verify aria-label and tab support in section of Account settings modal
cy.uiOpenProfileModal('Profile Settings');
cy.findByRole('tab', {name: 'profile settings'}).should('be.visible').focus().should('be.focused');
['profile settings', 'security'].forEach((text) => {
// * Verify each tab is correctly selected and supports navigating to the next tab with arrow keys
cy.findByRole('tab', {name: text}).
should('have.attr', 'aria-selected', 'true').
type('{downarrow}');
// * Verify aria-label on each tab and it supports navigating to the next tab with arrow keys
cy.focused().should('have.attr', 'aria-label', text).type('{downarrow}');
});
cy.uiClose();
@@ -104,10 +102,8 @@ describe('Verify Accessibility Support in different sections in Settings and Pro
cy.uiOpenSettingsModal();
cy.findByRole('tab', {name: 'notifications'}).should('be.visible').focus().should('be.focused');
['notifications', 'display', 'sidebar', 'advanced'].forEach((text) => {
// * Verify each tab is correctly selected and supports navigating to the next tab with arrow keys
cy.findByRole('tab', {name: text}).
should('have.attr', 'aria-selected', 'true').
type('{downarrow}');
// * Verify aria-label on each tab and it supports navigating to the next tab with arrow keys
cy.focused().should('have.attr', 'aria-label', text).type('{downarrow}');
});
});