ux: keyboard-navigable SelectMenu + replace native selects - #245
Merged
Conversation
…s/snippets SelectMenu (the accent-colored dropdown) had no keyboard support, so the native <select>s couldn't be replaced without regressing accessibility. Added full keyboard nav first, then swapped the selects that clashed with the app accent by opening a macOS-blue system popup. SelectMenu: - ArrowUp/Down, Home/End move a highlighted option (distinct from the selected one); Enter/Space commits it; Escape closes. - Type-ahead: printable keys jump to the next label starting with the buffer (600ms window), wrapping. Extracted as pure `typeaheadIndex`. - Trigger opens on ArrowDown/Enter/Space; highlight follows the mouse; active option scrolls into view; aria-activedescendant wired up. Conversions (native <select> → SelectMenu): - Settings: history limit, vault auto-lock, clip expiration. - Snippet editor: syntax + folder pickers. - History-limit labels are now i18n'd (settings.historyLimit.items, locale-formatted number) instead of a hardcoded "N items". Tests: 11 for SelectMenu (typeaheadIndex unit + RTL arrow/Home/End/ type-ahead/clamp). i18n across 15 locales. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
The accent-colored
SelectMenuhad no keyboard support, so native<select>s (which open a macOS-blue system popup that clashes with the orange accent) couldn't be replaced without regressing accessibility. This adds keyboard nav first, then does the swap.SelectMenu keyboard support
typeaheadIndex.aria-activedescendantwired up.Conversions (native → SelectMenu)
settings.historyLimit.items, locale-formatted number) instead of a hardcoded"N items".Left the Vault date/year pickers native — 50+ option lists where the platform picker is genuinely fine.
Tests
11 for SelectMenu —
typeaheadIndexunit cases + RTL arrow / Home / End / type-ahead / clamp. i18n across all 15 locales.tscclean · 557 tests green.🤖 Generated with Claude Code