Rule library Text alternatives

[role="img"] and [role="image"] elements must have alternative text

role-img-altWCAG 2.0 A

Ensure [role="img"] and [role="image"] elements have alternative text

Who this affects

An element with role="img" has no text alternative, so its meaning is lost.

How to fix it

Add aria-label describing what the graphic conveys.

Effort Low · ~5 min

Where this sits in the standard

WCAG success criterionLevelEN 301 549 clause
1.1.1 Non-text ContentA301-549, 9.1.1.1

EN 301 549 clause 9 applies these criteria to web content. The published version referenced by the European Accessibility Act is V3.2.1, which incorporates WCAG 2.1 level A and AA. More on the standard.

How to check it by hand

Turn images off in the browser, or run the page through a screen reader and listen to the image announcements. If you hear a file name, a hash, or nothing where something meaningful should be, the alternative is missing. Ask of every image: if this were removed, what would the reader need told?

Automated testing settles roughly a third of the WCAG success criteria. This rule is one an automated tool detects reliably — but a clean automated result is not proof of conformance.

Reference

Deque's technical write-up for this rule: role-img-alt

See whether your site trips this rule

Paste a URL. We open it in a real browser, dismiss the cookie wall and run the full EN 301 549 rule set. No account, no card.

Run a free scan All rules