Warning Image alt text — missing or empty

Why every <img> needs an alt attribute, when an empty alt="" is correct, and how screen readers and search engines use it.

The validator warns about images with no alt attribute at all (missing-alt), and separately flags images with an empty alt="" as informational (empty-alt) — a heads-up to confirm it's intentional, not an error.

Example

<!-- Meaningful image: describe it -->
<img src="chart.png" alt="Monthly revenue growth, up 12% year over year">

<!-- Purely decorative image: empty alt is correct -->
<img src="divider-swirl.png" alt="">

Why it matters

Screen readers announce an image's alt text in place of the image itself — with no alt attribute, some screen readers fall back to reading the file name ("IMG-4213-final-v2.jpg"), which is worse than useless. An empty alt="" is different and correct for purely decorative images: it tells assistive technology to skip the image silently rather than announcing something meaningless. Search engines also use alt text as one of the few signals they have about image content, feeding into image search.

Frequently asked questions

Should decorative images have alt text describing them?

No — use alt="" (present but empty). A screen reader will skip it silently. Giving a decorative image a real description just adds noise for someone navigating by screen reader.

What makes good alt text?

Describe the content or function of the image concisely, as if relaying it over the phone. Skip "image of" or "picture of" — screen readers already announce it as an image. For an image that's also a link, describe the link's destination or action instead of the picture.