Rule
Image alt text
Every <img> needs a text alternative.
- Rule
image-alt- WCAG 2.2
- 1.1.1 Non-text Content (opens in a new tab) (Level A)
- Severity
- Critical
What it checks
Every <img> needs a text alternative: an alt attribute, aria-label or aria-labelledby. An image with none of them fails, because a screen reader has nothing to say for it and may read out the file name instead.
An empty alt="" passes. It is how a page marks an image as decorative, so assistive technology skips it.
When a person decides
An alt that is a file name, such as photo.jpg, or a single generic word, such as image, is sent for review: it is there, but it tells the listener nothing. So is an alt made only of spaces, which hides the image without saying whether that was meant.
Example
Fails
<img src="sales-chart.png">
Passes
<img src="sales-chart.png" alt="Sales rose by a fifth in March">
The engine is tested against both examples.
How to fix it
Add an alt that says what the image tells a sighted reader. If the image only decorates, use alt="".
Check your own pages
This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.