WCAGdesk
axe-core: aria-valid-attr-value · WCAG 4.1.2 Name, Role, Value · Level A

How to fix the “aria-valid-attr-value” accessibility issue

The axe-core aria-valid-attr-value rule fails when an ARIA attribute carries a value the spec does not allow — most often an aria-labelledby or aria-describedby pointing at an ID that does not exist. WCAG 2.2 (4.1.2, Level A).

What axe-core checks

axe-core validates each ARIA attribute's value: that token values are allowed, and that ID references (aria-labelledby, aria-controls) point to elements that exist.

Which standard this maps to

WCAG 2.24.1.2 Name, Role, Value (Level A)
EN 301 5499.4.1.2
BFSG / EAABFSG § 12 via EN 301 549 · EAA Annex I
CategoryARIA

Why it matters

A broken aria-labelledby reference silently strips a control's name — the user hears nothing. These bugs are invisible on screen and only surface with assistive tech, exactly the gap a BFSG audit checks.

Common causes

  • aria-labelledby pointing to a missing or mistyped ID
  • aria-expanded="open" instead of true/false
  • aria-controls referencing an element removed by JS
  • A template duplicating IDs so the reference is ambiguous

How to fix it

Make every ID an ARIA attribute references actually exist and be unique, and use only the allowed token values for each attribute.

<!-- Fails: #lbl does not exist -->
<div role="dialog" aria-labelledby="lbl">…</div>

<!-- Passes -->
<h2 id="dlg-title">Address</h2>
<div role="dialog" aria-labelledby="dlg-title">…</div>

FAQ

Allowed values for aria-expanded?

Only "true" or "false" (or undefined). Words like "open" or numbers are invalid.

How do I find the bad reference?

axe names the attribute and value in its report; check that the referenced ID exists and is spelled exactly the same.

Find every issue like this on your site

Run a free WCAG 2.2 AA scan — real axe-core engine, no signup. Or get a timestamped evidence report for €29.