Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material/tabs): add aria-hidden to inactive tabs #27742

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

zarend
Copy link
Contributor

@zarend zarend commented Aug 31, 2023

Make accessibility fix for Tabs component. Add aria-hidden="true" to inactive tab panels. Fix issue where chromevox would read the names of inactive tab panels when navigating past the active tab panel (#27741). Fix this by adding aria-hidden="true" to inactive tab panels to exclude them from the a11y tree.

I believe what was happening is that the inactive tab panels had an aria-labelled by references that pointed to the tab header. Existing behavior seems to be that Chromevox was following the aria-labelledby references and announcing the labels of the inactive tabs. With this commit applied, Chromevox no longer reads panels of inactive tabs.

Fix #27741

Make accessibility fix for Tabs component. Add `aria-hidden="true"` to
inactive tab panels. Fix issue where chromevox would read the names of
inactive tab panels when navigating past the active tab panel (angular#27741).
Fix this by adding `aria-hidden="true"` to inactive tab panels to
exclude them from the a11y tree.

I believe what was happening is that the inactive tab panels had an
aria-labelled by references that pointed to the tab header. Existing
behavior seems to be that Chromevox was following the aria-labelledby
references and announcing the labels of the inactive tabs. With this
commit applied, Chromevox no longer reads panels of inactive tabs.

Fix angular#27741
@zarend zarend added Accessibility This issue is related to accessibility (a11y) area: material/tabs dev-app preview When applied, previews of the dev-app are deployed to Firebase labels Aug 31, 2023
@zarend zarend marked this pull request as ready for review August 31, 2023 01:21
@zarend zarend requested a review from crisbeto as a code owner August 31, 2023 01:21
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zarend zarend added the action: merge The PR is ready for merge by the caretaker label Aug 31, 2023
@crisbeto
Copy link
Member

crisbeto commented Sep 4, 2023

I'm merging this PR, because the equivalent internal change was merged already.

@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Sep 4, 2023
@crisbeto crisbeto merged commit 726fc06 into angular:main Sep 4, 2023
24 of 25 checks passed
crisbeto pushed a commit that referenced this pull request Sep 4, 2023
Make accessibility fix for Tabs component. Add `aria-hidden="true"` to
inactive tab panels. Fix issue where chromevox would read the names of
inactive tab panels when navigating past the active tab panel (#27741).
Fix this by adding `aria-hidden="true"` to inactive tab panels to
exclude them from the a11y tree.

I believe what was happening is that the inactive tab panels had an
aria-labelled by references that pointed to the tab header. Existing
behavior seems to be that Chromevox was following the aria-labelledby
references and announcing the labels of the inactive tabs. With this
commit applied, Chromevox no longer reads panels of inactive tabs.

Fix #27741

(cherry picked from commit 726fc06)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker area: material/tabs dev-app preview When applied, previews of the dev-app are deployed to Firebase target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(material/tabs): chromevox announces extraneous tabs
2 participants