Repository navigation
Conversation
Checked dropdown radio items share the focus background, so keyboard focus on the selected item was invisible. Add a shared inset focus ring to all dropdown and context menu items.
Collaborator
Author
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Keyboard focus on dropdown menu items was not visible in some cases. Checked radio items use the same
bg-surface-secondarybackground as the focus state, so focusing the selected proxy in the latency menu changed nothing on screen (axe Auditor issue 2864584, WCAG 2.4.7 Focus Visible). Other items such as "Proxy settings" and "Refresh latencies" only had a subtle background change.This adds a shared
menuItemFocusClass(focus-visible:ring-2 ring-inset ring-content-link, the same focus color used byButton,Link, andTabs) tomenuItemClassandDropdownMenuRadioItem. EveryDropdownMenuandContextMenuitem type (item, checkbox, radio, sub-trigger) picks it up. The ring is inset so scrollable menu containers cannot clip it, and:focus-visiblekeeps it off pointer hover. A newOpenedWithKeyboardstory covers the state in Pixel.Decision log
DropdownMenuRadioItemappliesbg-surface-secondaryfor bothfocusanddata-[state=checked], so the checked item has no focus delta.ProxyMenu, so every current and future menu item gets the indicator.DropdownMenuContentusesoverflow-hiddenandProxyMenuwraps items in anoverflow-y-autocontainer, both of which clip an outer ring.:focus-visibleinstead of:focus/data-highlighted: Radix focuses items on pointer move, so a:focusring would also show on mouse hover. Verified in the dev server that after a mouse click, hovering an item does not show the ring, while arrow-key navigation does.menuClasses.Note
Generated by Coder Agents on behalf of @chrifro.