[MM-45724] Accessibility on ATE unexpectedly able to tab on hidden formatting controls/buttons (#29722)

Этот коммит содержится в:
ayush-chauhan233
2025-01-31 21:55:40 +05:30
коммит произвёл GitHub
родитель 7a959038f9
Коммит a013797ed0
3 изменённых файлов: 3 добавлений и 2 удалений

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

@@ -246,7 +246,7 @@ describe('Verify Accessibility Support in different input fields', () => {
cy.get('#FormattingControl_strike').should('be.focused').and('have.attr', 'aria-label', 'strike through').tab(); cy.get('#FormattingControl_strike').should('be.focused').and('have.attr', 'aria-label', 'strike through').tab();
// * Verify if the focus is on the hidden controls button // * Verify if the focus is on the hidden controls button
cy.get('#HiddenControlsButtonRHS_COMMENT').should('be.focused').and('have.attr', 'aria-label', 'show hidden formatting options').tab(); cy.get('#HiddenControlsButtonRHS_COMMENT').should('be.focused').and('have.attr', 'aria-label', 'show hidden formatting options').click().tab();
// * Verify if the focus is on the hidden heading button // * Verify if the focus is on the hidden heading button
cy.get('#FormattingControl_heading').should('be.focused').and('have.attr', 'aria-label', 'heading').tab(); cy.get('#FormattingControl_heading').should('be.focused').and('have.attr', 'aria-label', 'heading').tab();

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

@@ -74,7 +74,7 @@ describe('FormattingBar', () => {
</form>, </form>,
); );
expect(screen.queryByLabelText('heading')).not.toBeVisible(); expect(screen.queryByLabelText('heading')).toBe(null);
userEvent.click(screen.getByLabelText('show hidden formatting options')); userEvent.click(screen.getByLabelText('show hidden formatting options'));

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

@@ -263,6 +263,7 @@ const FormattingBar = (props: FormattingBarProps): JSX.Element => {
timeout={250} timeout={250}
classNames='scale' classNames='scale'
in={showHiddenControls} in={showHiddenControls}
unmountOnExit={true}
> >
<HiddenControlsContainer <HiddenControlsContainer
ref={setFloating} ref={setFloating}