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

[A11y] Prevent tabbing to aria-hidden menu items #398

Merged
merged 3 commits into from
Feb 19, 2020

Conversation

mmarcuccio
Copy link
Collaborator

@mmarcuccio mmarcuccio commented Feb 19, 2020

Currently if a Menu is aria-hidden, you can still tab to its child menu items.
aria-hidden="true" does not hide focusable elements from screen reader or keyboard users as TAB key navigation ignores this attribute.

This PR sets a tab-index of -1 to all child menu items of an aria-hidden menu.

@mmarcuccio mmarcuccio changed the title [A11y] Prevent tabbing to hidden menu items [A11y] Prevent tabbing to aria-hidden menu items Feb 19, 2020
@codecov
Copy link

codecov bot commented Feb 19, 2020

Codecov Report

Merging #398 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master     #398   +/-   ##
=======================================
  Coverage   83.84%   83.84%           
=======================================
  Files          62       62           
  Lines        1300     1300           
  Branches      230      230           
=======================================
  Hits         1090     1090           
  Misses        159      159           
  Partials       51       51

@mmarcuccio mmarcuccio marked this pull request as ready for review February 19, 2020 00:36
Copy link
Member

@NinjaBanjo NinjaBanjo left a comment

Choose a reason for hiding this comment

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

seen bad things with -1 in the past, but im assuming this is tested, and it does have its place 👍

@mmarcuccio mmarcuccio merged commit 7a64487 into master Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants