Skip to content

Conversation

sergiou87
Copy link
Member

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 body element.

This PR makes the list inside the autocomplete component not focusable with the Tab key, which prevents the focus from going into the list when shift-tabbing from the co-authors input text.

Given we are using aria-activedescendant to 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

@sergiou87 sergiou87 merged commit 8828937 into development Nov 8, 2024
7 checks passed
@sergiou87 sergiou87 deleted the dont-lose-focus branch November 8, 2024 09:33
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.

2 participants