Resonance Logo

Autocomplete

An input that offers filtered suggestions as the user types, combining a text field with a dynamically updated listbox that supports keyboard navigation and screen reader announcements.

Demo

Type into the input field to see matching suggestions appear. Use the Down Arrow key to move into the list and navigate options. Press Enter to select an option or Escape to dismiss the suggestion list and return focus to the input.

What to Observe

Anatomy

[Anatomy image placeholder — will be added when assets are available]

  1. Label — a visible text label associated with the input that persists even when the suggestion list is open
  2. Text Input — the editable field where the user types; it controls the expansion state and active descendant of the listbox
  3. Listbox — the container that holds the list of suggestion options and is shown or hidden based on input activity
  4. Option — an individual selectable suggestion within the listbox, each with a unique identity for programmatic reference
  5. Status Announcement — a live region that communicates the number of available results to screen reader users

Accessibility Behavior

Common Mistakes

Why This Matters

Autocomplete is one of the more complex interactive patterns on the web, and its accessibility depends on an exact combination of roles, states, and keyboard behaviors working together. When any piece is missing — an unlabelled input, an unannounced list, a missing keyboard exit — screen reader and keyboard users are left without a functional experience. When implemented correctly, autocomplete dramatically reduces the effort required to fill in fields with large sets of valid options, benefiting all users including those with cognitive and motor disabilities.

Accessibility Validation

This component is validated against internal accessibility criteria aligned with WCAG standards, using our internally developed system, Resonance Specs.

To learn more, please contact us.

Code

Reference Implementation