All posts
·#Accessibility#React

An Accessible Combobox in 80 Lines

Most combobox bugs come from missing aria-activedescendant. Here is the minimum set of ARIA you actually need.

WCAG-friendly comboboxes need three things working together: role="combobox" on the input, aria-controls pointing at the listbox, and aria-activedescendant updated as the user arrows through options.

Keyboard map: ArrowDown opens and moves; Enter selects; Escape closes and restores; Home/End jump to first/last; typing filters.

The trap people fall into is moving DOM focus into the listbox — don't. Focus stays on the input, and aria-activedescendant does the announcing.