Documentation/Valid ARIA values

Valid ARIA values

ZMD021

Validate supported ARIA attributes to ensure static values are in the allowed token/boolean/numeric formats.

✅ Good

<button aria-pressed="false">Mute</button>
<div role="heading" aria-level="2">Title</div>

❌ Bad

<button aria-pressed="maybe">Mute</button>
<div role="heading" aria-level="high">Title</div>

When: A supported ARIA attribute has a static value outside its allowed set

Warning: ARIA attribute "..." has invalid value "..."

Solution: Replace the value with a valid token/boolean/numeric value for that attribute.

Tips & edge cases

  • Prefer native semantics first and use ARIA only when needed.
  • Keep ARIA values literal and standards-compliant when they are static.