Skip to Content

Images with empty alt text

What it is

One or more images on the page have an alt attribute with no text in it (alt="", or only spaces) and nothing marking them as decorative. An empty alt tells screen readers to skip the image. That is right for decoration, but it hides content when the image shows something visitors need, such as a chart, a product photo or a logo that links somewhere.

Why it matters

Visitors using a screen reader miss whatever the image conveys, and a link whose only content is such an image is left without a name. Meaningful images without a text alternative fail WCAG success criterion 1.1.1 Non-text Content  (Level A), and since June 2025 the European Accessibility Act requires many businesses selling to consumers online in the EU to meet it. Google uses alt text  to understand images, and an empty one gives it nothing.

How Asky checks it

Asky reads the page’s raw HTML and checks every <img> whose alt is present but empty or only whitespace. Clearly decorative images are skipped: those with role="presentation" or role="none", those with aria-hidden="true" on the image or around it, those whose width and height are both numbers of 1 or less (tracking pixels, not an empty value or 1px), and those inside a link or button with text of its own. The rest are listed by src in one finding. Decoration without one of these markers is reported too; an image that is a link’s only content also raises the link name issue. A missing alt attribute is a separate issue.

Reported as an error with high severity.

How to fix it

  1. Open the finding and look at each listed image where it appears on the page.
  2. If the image carries information, such as a chart, a product photo, a screenshot or text set in an image, write alt text that gives the same information.
  3. If it is the only content of a link or button, write alt text that names the destination or action.
  4. If it is decorative, such as a flourish, a divider or an icon next to text that says the same thing, alt="" is the correct markup: the W3C alt decision tree  walks through the cases. Adding aria-hidden="true" to the image makes the choice explicit and stops Asky reporting it.
  5. Check your CMS settings: an image marked decorative in Webflow, or left with an empty Alternative Text field in WordPress, is output with an empty alt, so make sure only true decoration is set up that way.
  6. To leave it as it is: if every listed image is decorative and you prefer not to change the markup, mark the issue resolved.

Example

The logo is the only content of the home link on https://example.com:

<!-- Before: the link has no name --> <a href="/"><img src="/images/logo.svg" alt=""></a> <!-- After --> <a href="/"><img src="/images/logo.svg" alt="Example Co home"></a>

← Back to Images

Last updated on