Guides
Accessibility and performance
WAI-ARIA patterns, screen reader announcements, forced colors, contrast, touch and focus rules, and the performance budgets the dropdowns are gated on.
Accessibility
Each component follows one WAI-ARIA Authoring Practices pattern: Select
the select-only combobox, Combobox the editable combobox with list
autocomplete (a grid popup with columns), Listbox the listbox (the
grid with layout="grid"), Mention combobox semantics on its field and
TreeSelect a combobox with a tree popup.
- Conformance:
npm run test:a11yruns axe-core over every dropdown, closed and open, in light, dark and right-to-left layouts, with zero violations, and keeps ARIA snapshots of the open lists. - Screen readers: virtual options carry
aria-setsizeandaria-posinset("12 of 10,000"); a polite live region announces the result count after a search and the selection limit ofmaxSelected(localeText.resultCountandlocaleText.limitReachedonSelectandCombobox;resultCountandselectionLimitonListbox). - Virtual focus: DOM focus stays on the trigger, input or list
(or the popup search field of
searchable), and the active option isaria-activedescendant. The active option is always mounted, even when the list is scrolled away from it. - High contrast: under
forced-colors: activeselected options useHighlight, the active option an outline, disabled optionsGrayText, and chips and fields keep their borders. - Color contrast: every color comes from the theme variables derived from the five seeds (Theme), whose text and boundary contrast is guaranteed; no stylesheet has a literal color.
- Touch: options, triggers and chip remove buttons
are at least 24 × 24 px, nothing appears on hover only, and the popup
flips and shifts to stay on screen when an on-screen keyboard shortens the
viewport.
popupMode="sheet"onSelectandTreeSelect(or"auto"on phones) opens a full-screen sheet. - Focus: opening and closing keep focus on the trigger or input; after a pointer pick focus returns there; the focused control shows the theme focus ring.
The keyboard tables are on each component page: Select, Combobox, Listbox, Mention and TreeSelect.
Dropdown accessibility
Open demoA Select, a Combobox with chips and a Listbox with selected, active and disabled options for keyboard, screen reader, forced-colors, touch and server-rendering checks.
Performance
The dropdowns are measured on the production build in Chromium; the
budgets gate the release (npm run release:verify).
| Scenario | Budget |
|---|---|
Open a Select or Combobox over 100,000 local items, click to painted |
≤ 50 ms, options in DOM ≤ visible + 2 × overscan |
| One filter step over 100,000 items with the index built; index build | ≤ 8 ms p95; ≤ 40 ms, after the first paint |
Scroll the popup or a Listbox at 2,000 px/s |
handler ≤ 1 ms p95, frame ≤ 16.7 ms p95, 0 blank frames |
| Move the active option | ≤ 2 options re-rendered per key |
| Select all over 100,000 items | ≤ 20 ms; the event's items built on first read |
- Remote search: every new search or window aborts the requests
it supersedes (
AbortSignal), and a response for an older search never replaces a newer one. - Server rendering: the server renders the trigger, the value
and the hidden form element (and a
Listboxlist), never a popup, and its work does not grow withdatabeyond the value label lookup. The Vite SSR and Next App Router examples hydrate every dropdown without a warning. - Bundle size: each component is its own subpath with its own
gzip budget (
@salmonui/dropdowns/select,/combobox,/listbox,/mention,/tree-select); popups, search, remote reads, drag and drop and the grid keyboard are lazy chunks. - Closed dropdowns: a closed dropdown adds no document or window listeners, observers or intervals; they are attached when a popup opens and removed when it closes.
Dropdowns over 100,000 items
Open demoSelect, Combobox, Select multiple with select all and the Combobox columns popup over 100,000 local items, plus twenty closed Selects sharing the same data.