ARIA attributes must have valid values
Each ARIA attribute accepts only certain values: true or false, a number, a token from a list, or the ID of an element on the page. Anything else is ignored, so the state or relationship never reaches assistive technology.
| Rule ID | aria-valid-attr-value |
|---|---|
| Impact | Critical |
| Success criterion | 4.1.2 Name, Role, Value · A |
| Standards | WCAG 2.0 · WCAG 2.1 · WCAG 2.2 · Section 508 · EN 301 549 |
| Fixed automatically |
Example
<button aria-expanded="yes" aria-controls="size-chart">Size guide</button>
<div id="size-chart" hidden>…</div>Screen readers ignore the state, so users do not hear whether the size guide is open or closed.
<button aria-expanded="false" aria-controls="size-chart">Size guide</button>
<div id="size-chart" hidden>…</div>A screen reader says “Size guide, button, collapsed”, then “expanded” once opened.
Why it matters
ARIA states and properties tell screen reader users things they cannot see: that a menu is open, a field is required, a tab is selected, or a description lives in another element. Browsers only pass on values the specification allows. aria-expanded="yes", aria-hidden="hidden" or aria-labelledby pointing to a missing ID are dropped as if the attribute were not there.
The consequences range from confusing to blocking. A blind user may not know a submenu opened, may not hear an error message, or may land on a control with no name because its label reference is broken. Voice control can also fail when names are lost. Since nothing changes on screen, these errors survive visual testing. This fails WCAG 4.1.2, because states and properties are not exposed correctly.
How to fix it
Look up the allowed values of the attribute and correct the value.
True/false attributes (aria-hidden, aria-required, aria-disabled, aria-modal): use true or false, never yes, 1 or the attribute name.
Tristate attributes (aria-checked, aria-pressed): true, false or mixed.
Token attributes: use one of the listed words, in lower case. aria-live takes off, polite or assertive; aria-autocomplete takes none, inline, list or both; aria-current takes page, step, location, date, time, true or false.
Numbers: aria-level, aria-posinset and aria-valuenow need numbers; aria-level must be a whole number of 1 or more.
ID references (aria-labelledby, aria-describedby, aria-controls, aria-owns, aria-errormessage): every ID must exist on the page. Generate IDs and references from the same variable:
<input id="postcode" aria-describedby="postcode-error" aria-invalid="true">
<p id="postcode-error">Enter a postcode like SW1A 1AA</p>
If a controlled popup is only added to the DOM when it opens, set aria-expanded="false" until then. Update states in your script at the moment they change.
Checklist
- Use true or false, never yes, no, 1 or 0.
- Pick token values only from the attribute's allowed list.
- Make every referenced ID exist on the page.
- Use whole numbers of 1 or more for aria-level.
- Update states in script when the UI changes.
How the check works
The check looks at every element with ARIA attributes and validates each value against the attribute's type: boolean, tristate, token, number or ID reference. It fails on values outside the allowed set and on references to IDs that do not exist. Some cases need review instead: aria-controls on a collapsed or popup trigger, unknown aria-current values, missing aria-labelledby or aria-describedby targets, and empty values.
Resources
Updated October 27, 2026