Correct ARIA attributes that hold values ARIA doesn't allow

ARIA attributes must conform to valid values is the message for axe's aria-valid-attr-value rule, and it means an aria- attribute on the page holds a value the ARIA specification doesn't allow for it, such as aria-expanded="yes" or an aria-controls naming an id that isn't on the page. Assistive technology can ignore or misread the attribute, so the state or relationship it was meant to convey doesn't reach the user. Fix the value, or remove the attribute where a native HTML element already provides it.

Common invalid ARIA values and their fixes

FailsFix
aria-expanded="yes"Use true or false. WAI-ARIA 1.2 allows only those and undefined.
aria-pressed="on"Use true, false or mixed, the values aria-pressed accepts besides undefined.
aria-haspopup="select"Use menu, listbox, tree, grid, dialog, true or false, the tokens aria-haspopup defines.
aria-hidden="hidden"Use true to hide the element from assistive technology, or remove the attribute.
aria-controls="menu" with no element whose id is menuPoint it at the id of the element it controls, or remove it. Check for an id that a component renames on each render.

Values axe lists for review instead of failing

  • An unknown aria-current value

    ARIA treats any value outside page, step, location, date, time, true and false as true, so axe asks you to confirm. Pick the token that fits, such as page for the current link in a menu.

  • A label or description with a missing id

    When aria-labelledby or aria-describedby names an id that isn't on the page, axe asks for review, since the element might load later. Browsers ignore ids that match nothing.

  • An empty value

    An empty value on an attribute that takes true or false, a number or a token, such as aria-expanded or aria-hidden, goes to review. An empty id reference, aria-current or aria-haspopup passes. ARIA tells browsers to treat an empty value the same as a missing attribute.

The review cases are in axe-core's source for this check, and its attribute list marks which attributes may be empty. The aria-current definition and the rules for empty values and missing ids are in WAI-ARIA 1.2.

Why a wrong ARIA value can be worse than none

  • ARIA changes what assistive technology reports, so a bad value misinforms rather than just failing to help. W3C's ARIA guide puts it plainly: no ARIA is better than bad ARIA. Deque's rule page gives the example of a checkbox, where any value besides true, false or mixed can stop it working.

  • WebAIM's 2026 Million report found that home pages using ARIA averaged 59.1 detected errors, against 42 on pages without it, though it notes those pages also tend to be more complex. A native button, checkbox or details element carries its state without any aria- attribute to get wrong.

How to fix an invalid ARIA value

  1. Read the attribute in the resultaxe lists each attribute and value it rejected, such as aria-expanded with the value yes. That's often enough to spot a typo or a value borrowed from another attribute.
  2. Look up the allowed valuesCheck the attribute's entry in the WAI-ARIA specification. Each one lists its value type and, for tokens, every value it accepts.
  3. Fix it where the value is setValues written by JavaScript, such as a toggle that sets open and closed, need fixing in the script, not only in the HTML the page starts with.
  4. Replace custom widgets with native HTMLA details element, a checkbox input or a disabled button carries its state without ARIA, which removes the attribute that failed.
  5. Rerun the rule in each stateOpen and close menus, dialogs and accordions before running axe again, since many values change only after someone interacts.

Frequently asked questions

How is this different from invalid ARIA names?

This rule checks values. A misspelled attribute name, such as aria-labeledby with one l, is reported by aria-valid-attr with the message ARIA attributes must conform to valid names. Deque's page for that rule uses aria-visible, an attribute that doesn't exist, as its example.

Why does aria-controls pass when its target is missing?

axe skips that check while the element has aria-expanded="false" or aria-selected="false", because the controlled element may only be added once it opens. On an element with aria-haspopup set to anything but false, a missing target goes to review instead. axe-core's source holds that logic, so open the menu and run the rule again to check the id.

Is an invalid ARIA value a WCAG failure?

Yes, at Level A. Deque links this rule to WCAG's Name, Role, Value, the criterion about exposing a control's states and properties to assistive technology, and gives it a critical impact rating.