Skip to content

[Design] Listbox typeahead: naming, placement, and full APG parity #908

Description

@johnleider

Ask

Printable-character typeahead navigation for Select — and eventually any listbox-pattern surface — so keyboard users can jump the highlight to items by their leading character, matching native <select> behavior. Originates from the #543 WS4 accessibility audit; a working prototype was built in #635 and split out pending this design pass.

Open questions

  1. Name. The prototype exposed it as typeahead(char) on VirtualFocusReturn, which breaks the composable's imperative verb family (highlight / clear / next / prev / first / last). Candidates: find, match.
  2. Home. useVirtualFocus owns the cursor and the item registry, so it is the natural host — but the feature embeds DOM textContent reads into an otherwise DOM-light composable, and useRovingFocus will eventually want identical behavior. Options: keep it on useVirtualFocus, or extract a shared text-matching seam both focus composables consume.
  3. Scope / APG parity. The prototype was single-character only. Full APG listbox typeahead needs a timed multi-character buffer (useTimer is the obvious substrate) and a decision on closed-state semantics — native <select> responds to typeahead while closed (changing the value), whereas the prototype was inert unless the listbox was open.

Prototype

The removed implementation (composable method, SelectActivator keydown wiring, unit + browser tests) is recoverable at the pre-split head of #635: bdb78da8e.

Refs #543, #635.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions