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

Consider focusables with tabindex="-1" to be unreachable #43

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

NickGoward
Copy link
Contributor

@NickGoward NickGoward commented Jun 5, 2024

Consider focusables with tabindex="-1" to be unreachable

Description

Updates LRUD to ignore focusables with tabindex="-1", but still focus any focusable elements within any parent with tabindex="-1".

Motivation and Context

Elements with a tabindex of -1 should only be focusable programatically and not be part of the navigational flow of the document. This is in-line with behaviour of tabbing order in a standard HTML document. See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex

The primary driver for this change is the existence of devices which only announce aria-live regions if they have a tabindex, but these regions should not be focusable.

How Has This Been Tested?

New unreachable.html layout created in tests and tests written.
Manual testing with this layout.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@NickGoward NickGoward requested a review from a team as a code owner June 5, 2024 08:17
@NickGoward NickGoward merged commit 07e0f71 into master Jun 5, 2024
1 check passed
@NickGoward NickGoward deleted the tabindex-minus-one branch June 5, 2024 09:10
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