acc
How to fix: ARIA attribute validity (WCAG 4.1.2 A)
Why this matters
Invalid ARIA roles and attributes are silently ignored by assistive technology — worse than no ARIA at all, because the author thinks they've addressed accessibility. Common typos: aria-labeled-by, role="navigaton". WCAG 4.1.2 Level A applies.
Background
Invalid ARIA roles + attributes are silently ignored by assistive technology — worse than no ARIA at all, because the author thinks they've addressed accessibility. Validate against the WAI-ARIA spec.
References
WCAG 2.1 SC 4.1.2 Name Role Value (A) · WAI-ARIA 1.2 spec
How to fix
Code snippet for each stack we cover. Pick the one matching your server / framework.
nginx
No server config — markup audit.
apache
Same.
cloudflare
Same.
wordpress
Run axe DevTools on key pages. It flags invalid roles and attributes with line numbers.
flask
Run axe-core in CI (https://github.com/dequelabs/axe-core). Add eslint-plugin-jsx-a11y for component frameworks.
express
Same.
rails
Same.
Verify it's working
Run axe DevTools (browser extension) on every key page. Should report 0 invalid ARIA findings.
Want to know if your site has this issue?
Run a free 53-check audit — security, GDPR, NIS2, and technical SEO.
Audit my site →