Skip to content

NativeSelect: keyboard-only focus ring in Chrome - #117

Merged
microbit-matt-hillsdon merged 1 commit into
mainfrom
native-select-focus
Sep 2, 2026
Merged

NativeSelect: keyboard-only focus ring in Chrome#117
microbit-matt-hillsdon merged 1 commit into
mainfrom
native-select-focus

Conversation

@microbit-matt-hillsdon

@microbit-matt-hillsdon microbit-matt-hillsdon commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

The input recipe falls back to native :focus-visible for bare elements wearing it, excluding only input/textarea. Chrome's heuristic also matches :focus-visible on a clicked (Firefox does not), so NativeSelect had a focus ring on every pointer click. Track modality with react-aria's useFocusRing and stamp data-focus-visible, as the bare Input does, and add select to the recipe's native-fallback exclusion list. Fixes #116

The input recipe falls back to native :focus-visible for bare elements
wearing it, excluding only input/textarea. Chrome's heuristic also
matches :focus-visible on a clicked <select> (Firefox does not), so
NativeSelect rang on every pointer click.

Track modality with react-aria's useFocusRing and stamp
data-focus-visible, as the bare Input does, and add select to the
recipe's native-fallback exclusion list.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6b5861b
Status: ✅  Deploy successful!
Preview URL: https://d55bf83e.ui-2wg.pages.dev
Branch Preview URL: https://native-select-focus.ui-2wg.pages.dev

View logs

@microbit-grace microbit-grace left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@microbit-matt-hillsdon
microbit-matt-hillsdon merged commit 223f217 into main Sep 2, 2026
3 checks passed
@microbit-matt-hillsdon
microbit-matt-hillsdon deleted the native-select-focus branch September 2, 2026 15:17
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.

Clicking on NativeSelect makes focus ring visible

2 participants