Text alternatives · WCAG 2.0 Level A
[role="img"] and [role="image"] elements must have alternative text
Ensure [role="img"] and [role="image"] elements have alternative text.
What it means
The role-img-alt rule flags elements that fail this check. It maps to WCAG success criterion 1.1.1.
Who it affects
People who are blind or have low vision and use screen readers, and anyone whose images fail to load.
How to fix it
Elements with role="img" need an accessible name via aria-label or aria-labelledby.
<div role="img" aria-label="Map of our service area"></div>
Check it on your site
Run a free scan. If this rule fails, the results list the affected elements. Deque, which maintains axe-core, also documents this rule in detail: Deque University: role-img-alt.
Quick answers
What does the axe rule "role-img-alt" check?
Ensure [role="img"] and [role="image"] elements have alternative text.
How do I fix "[role="img"] and [role="image"] elements must have alternative text"?
Elements with role="img" need an accessible name via aria-label or aria-labelledby.
Who is affected by role-img-alt failures?
People who are blind or have low vision and use screen readers, and anyone whose images fail to load.
Automated accessibility scan. Results are informational and may not identify every accessibility issue. This service is not legal advice, a compliance certification, or a substitute for comprehensive manual accessibility testing.