Resonance Logo

Text Input

A text input accepts a single line of freeform text from the user, paired with a visible label and optional hint or error text connected through accessible attributes.

Demo

Tab to each input field and type to enter text. Observe how the label remains visible above the field at all times. Trigger a validation error by submitting or leaving a required field empty, and listen for how a screen reader announces the error message in relation to the input.

Must be 6–20 characters long.
We'll never share your email.

What to Observe

Anatomy

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

  1. Label: A <label> element associated with the input through a matching for and id pair; it is always visible and never replaced by a placeholder.
  2. Input field: The <input> element where the user types, with an appropriate type attribute and an autocomplete hint where applicable.
  3. Hint text: An optional message below the label or field providing format guidance, linked to the input through aria-describedby.
  4. Error message: A validation message displayed when input is invalid, injected into a live region or linked via aria-describedby so it is announced automatically.
  5. Required indicator: A visual marker (typically an asterisk) accompanied by a text explanation, and the required or aria-required attribute on the input.

Accessibility Behavior

Common Mistakes

Why This Matters

Text inputs appear on nearly every form in every application, and form completion is one of the most critical tasks users perform online — account creation, checkout, contact, and support all depend on it. A text input that lacks a persistent label, properly associated error message, or keyboard-accessible behavior can completely block a screen reader user or a keyboard-only user from completing a task. Because forms are so universal, getting this pattern right has the highest possible impact on the number of people who can successfully use an interface.

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