Fix focus order when shift-tabbing from co-authors input text#19517
Merged
sergiou87 merged 3 commits intodevelopmentfrom Nov 8, 2024
Merged
Fix focus order when shift-tabbing from co-authors input text#19517sergiou87 merged 3 commits intodevelopmentfrom
sergiou87 merged 3 commits intodevelopmentfrom
Conversation
niik
approved these changes
Nov 7, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
xref. https://github.com/github/accessibility-audits/issues/8568
Description
The problem was that when shift-tabbing from the co-authors input text, the focus would go into an item of the autocomplete list right before closing the autocomplete list, so the focused element would be immediately removed and focus would go to the
bodyelement.This PR makes the list inside the autocomplete component not focusable with the
Tabkey, which prevents the focus from going into the list when shift-tabbing from the co-authors input text.Given we are using
aria-activedescendantto manage focus inside the autocomplete list, we keep the DOM focus in the input text. That means, "shift-tabbing" from that scenario should move the DOM focus to the "toggle co-authors" button and the DOM focus should never go to the autocomplete list.Screenshots
CleanShot.2024-11-07.at.13.00.04.mp4
Release notes
Notes: [Fixed] Fix logical tab order from co-authors text box