liveBook · Manning

ARIA label

As explained in Architecting Accessibility

aria-label is an ARIA attribute that assigns an accessible name to an interface element.

A control or navigation area needs a name that tells people what it does or where it leads. The aria-label attribute supplies an accessible name when a suitable visible label is unavailable. For example, an icon-only button may need one so assistive technology users can identify its purpose. section 6.1.1

<nav aria-label="Primary"> #A
...
<nav aria-label="Footer"> #B

These labels distinguish primary navigation from footer navigation without replacing the native nav elements. section 2.5.1

Prefer a visible, programmatically associated label for an ordinary form control. Use aria-labelledby when nearby visible text can name a custom control. Reserve aria-label for cases where those approaches do not fit: it is rarely needed in ordinary forms. section 6.1.1

<label for="amount">Payment amount</label> #A
<span id="currency">Euros</span> #B
<input id="amount" aria-labelledby="currency"> #C

Take care when adding an ARIA name to an already labeled field. Here, aria-labelledby overrides the native label, leaving the announced name as “Euros” rather than “Payment amount Euros.” aria-label can likewise take precedence over a native label. section 6.1.1

How Architecting Accessibility covers it

How deep it goes
Explains when to use aria-label and warns about naming precedence, without detailing accessibility-tree algorithms.
Examples
Contrasts primary and footer navigation labels, an icon-only button, and a payment field whose ARIA name overrides its native label.
What it assumes
Assumes basic familiarity with HTML elements while explaining how visible form labels associate with controls.
What you can do after
Evaluate/understand when an element needs aria-label instead of a native label or a reference to visible text.
How it connects
Connects accessible names to semantic HTML, form labels, aria-labelledby, and navigation landmarks.

Also explained in

Compare how 2 books explain ARIA label →

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.