A11y Bug 6210624: Keyboard focus does not land over the selected item after expanding the "location dropdown" using keyboard.#644
Open
KethanaReddy7 wants to merge 4 commits intouser/kpeddireddy/LocationButtonTabfrom
Conversation
…yboard When the location dropdown is expanded using keyboard (Tab + Enter), focus should automatically move to the currently selected section. This improves keyboard accessibility by ensuring users can immediately identify which item is selected. The fix adds focus management to the onPopupToggle handler that: - Focuses on the selected section using aria-selected, data-id, or id - Falls back to focusing the first focusable item if no selection exists Fixes #640 Co-authored-by: KethanaReddy7 <KethanaReddy7@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
@claude the problem is that when focus lands on location dropdown and on hitting enter the focus is not landing on the list, so on hitting enter the focus should go into the dropdown list |
|
Claude finished @KethanaReddy7's task in 2m 23s —— View job Fix Applied
Issue: The original code used Fix: Replaced Changes made:
Commit: de64190 |
…focus Replace requestAnimationFrame with setTimeout(100ms) to ensure the OneNotePickerComponent popup is fully rendered before attempting to focus on the selected item. requestAnimationFrame alone may fire before the external component has finished rendering its interactive elements. Co-authored-by: KethanaReddy7 <KethanaReddy7@users.noreply.github.com>
87e76bf to
ef0f3af
Compare
ef0f3af to
6918ceb
Compare
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.
When the location dropdown is expanded using keyboard, focus should move to the dropdown list automatically when we hit enter. This improves keyboard accessibility by ensuring users can immediately identify which item is selected.
The fix adds focus management to the onPopupToggle handler that:
Demo
https://github.com/user-attachments/assets/aa5fc10b-28ca-46e1-8d62-ebeef9326953
Fixes #640