Repository navigation
Conversation
…tocomplete a11y Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VD8gaUA7K5gseR3E5X8cBA
This branch has not been deployed
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.
Summary
PR 4 of the Phase −1 bug-fix stack.
Flyout/FlyoutContent.tsx):role="tooltip"is now used only for hover content that doesn't trap focus. Otherwise the role comes fromtrapFocusMode. DropdownMenu submenus are nowrole="menu". Hover Popovers (content-menu) keep whatever role is passed in their attributes, and no longer gettooltip.Flyout/FlyoutControlled.tsx): the defaulttrapFocusModeis nowfalsefortriggerType="hover"and stays"dialog"otherwise.content-menu) and DropdownMenu (action-menu) already pass their mode explicitly, so they're unchanged.TrapScreenReaderonce the tooltip had focusable content.Flyout/FlyoutControlled.tsx,hooks/useIsDismissible.ts):useIsDismissibletakes a new optional{ strict }argument. Strict mode skips the "independent, not nested" shortcut.useIsDismissiblesignature.Popover.Dismissible(Popover/Popover.tsx): now passesreason: "close-button".Flyout/Flyout.constants.ts): removeddefaultStyles,resetStylesand the unusedmouseLeave. None of them were exported publicly.Flyout/FlyoutTrigger.tsx):aria-describedbyis now set only for hover triggers. Focus triggers like Autocomplete are already linked witharia-controls.Autocomplete/Autocomplete.tsx): the highlighted option is scrolled into view on ArrowUp/ArrowDown withscrollIntoView({ block: "nearest" }).MenuItem/MenuItem.module.css): CSS-only fix.:hoverbackground is ignored in keyboard mode (data-rs-keyboardon<html>), but only forrole="menuitem"androle="option"items, so standalone MenuItems such as navigation keep their hover.Tests (all fail on the base branch and pass here):
Flyout.stories.tsx:test: content roles,test: escape closes the latest flyoutAutocomplete.stories.tsx:test: keyboard highlight scroll, which also checksaria-describedbyandaria-controlsPopover.stories.tsx: the existing dismissible story now expects{ reason: "close-button" }Related Issue
Phase −1 of the headless-extraction plan.
Screenshots / Recordings
The only visual change: menu items no longer show a hover background while keyboard navigation mode is active.
Notes for Reviewers
fix/numeric-inputs).mousedown. After keyboard navigation, hovering menu items shows no highlight until the user clicks. That's what "suppress:hoverin keyboard mode" means, but please confirm the trade-off.disableCloseOnOutsideClick), Escape used to close both. It now closes only the latest one.Flyoutused directly withtriggerType="hover"and notrapFocusModeno longer traps focus. Interactive hover content needs an explicit mode, asPopoveralready passes.:hover.pnpm lintpasses.pnpm test:browserhas 618 passing and 1 failing,Image > onLoad, which also fails onmainin this sandbox because it has no network access.Generated by Claude Code