-
Notifications
You must be signed in to change notification settings - Fork 65
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
[Fix] Theme selector incorrectly focus on first item after selection #1164
base: main
Are you sure you want to change the base?
[Fix] Theme selector incorrectly focus on first item after selection #1164
Conversation
Signed-off-by: Willie Hung <willie880201044@gmail.com>
Hi @kgcreative, could you please assist in determining the best UX for this scenario? Thank you! |
Signed-off-by: Willie Hung <willie880201044@gmail.com>
This is a challenging one. When opening via mouse, we shouldn't have a focus selector, however, per WCAG accessibility standards, there is an expectation that when you open a control via keyboard interaction, that we move keyboard focus to the first item in the opened control. As such, if we can't differentiate between keyboard or mouse input, the existing behavior is the more correct one. Additional context: https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-focus-visible.html |
Thanks for sharing your insights, @kgcreative! Based on what you've described, would you suggest implementing a mechanism where if the element is opened via keyboard (for example, pressing the Tab key), we highlight the selector, but if not, we skip the highlighting? |
This may be a larger issue. I would explore using cc: @BSFishy + @joshuarrrr |
I feel like this is the wrong way to go about this. I think that changing the default value for focus would be breaking for UX. Additionally, |
Yeah, this needs to be a component level change, not changing the fous behavior in the implementation |
Description
This PR removes the initial focusing state when opening up the theme selector popup.
Issues Resolved
Fixes #1163
Demo
Before
before.mov
After
After.mov
Misc
Also fix a typo in
guide_version_selector.tsx
.Check List
yarn lint
yarn test-unit