liveBook · Manning

Aria-describedby

As explained in Architecting Accessibility

aria-describedby is an ARIA attribute that associates an interface element with one or more elements providing supplementary descriptive text.

Use aria-describedby to associate supplementary guidance—such as a hint, constraint, formatting instruction, or warning—with a control. Keep that guidance separate from the label so screen reader users can receive it without changing the control’s accessible name. section 6.1.1

<div class="form-row" id="owner-name-group">
  <label for="owner-name">
    Owner's name <span class="required-text">(required)</span>
  </label>
  <p id="owner-name-error" class="error-message" hidden></p>
  <input id="owner-name" 
    name="owner_name" 
    type="text" 
    autocomplete="name" 
    autocapitalize="words"
    spellcheck="false"
    required 
    aria-describedby="owner-name-hint owner-name-error" />
  <div id="owner-name-hint" class="hint">
    Enter the owner's first and last name.
  </div>
</div>

The owner-name field references both its hint and its inline error, associating each as supplementary information. section 6.1.10

The same pattern can provide additional guidance for an action, such as a warning associated with a “Clear all fields” button. section 6.1.10

How Architecting Accessibility covers it

How deep it goes
Shows when to reference supplementary text and provides form examples, but does not detail announcement mechanics.
Examples
Uses form hints and inline errors for an owner-name field, plus a warning on a clear-all button.
What you can do after
Apply it via aria-describedby to associate visible hints, errors, or warnings with controls.
How it connects
Distinguishes supplementary descriptions from labels, accessible names, and aria-labelledby.

Also explained in

Compare how 2 books explain aria-describedby →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.