Images must have alternative text

How to fix the image-alt accessibility rule. Images and text alternatives.

What this rule checks

Ensure <img> elements have alternative text or a role of none or presentation

Who is affected

Screen readers can't see images. Without alt text they read out nothing or the file name, so blind users miss the content.

How to fix it

Add an alt attribute that says what the image shows or does. If the image is purely decorative, use an empty alt="" so screen readers skip it.

Example

Before

<img src="team.jpg">

After

<img src="team.jpg" alt="Our five-person support team in the office">

WCAG success criteria

When this rule fails, the page fails:

Find it on your own page

Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools.

More detail