Resonance Logo

Search Input

A search input is a semantically marked-up text field for submitting queries, typically including a visible label, search icon, and an accessible clear button.

Demo

Type a query into the search field and observe how the clear button appears. Try activating the clear button with a keyboard. Check that the field's purpose is announced by a screen reader when it receives focus, and that submitting with Enter triggers the search action.

What to Observe

Anatomy

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

  1. Search landmark: The wrapping element with the search role that allows assistive technologies to identify and navigate to the search region.
  2. Field label: The visible text label associated with the input that persists at all times and describes the field's purpose.
  3. Search icon: A decorative visual indicator that reinforces the field's search purpose; hidden from screen readers.
  4. Text input: The input field where users type their query, marked up as a search input type.
  5. Clear button: An interactive button that clears the field contents, visible only when the field has a value.
  6. Submit button: An optional explicit control to submit the search, supplementing Enter key submission.

Accessibility Behavior

Common Mistakes

Why This Matters

Search is one of the most critical pathways users take to find content on a site or in an application. When the field has no persistent label, users who need the label most — those using screen readers or those with cognitive disabilities — lose their bearings as soon as they begin typing. A clear button that is inaccessible by keyboard traps users who cannot use a mouse with a field they cannot efficiently reset. Treating search as a first-class accessible component ensures that the fastest path to content is open to everyone.

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