Image without alt text: understanding and fixing the “image-alt” finding
What the message “Images must have alternate text” means, who it affects and how to find and fix missing alt attributes in HTML, WordPress and shop systems.
In short
The message “Images must have alternate text” (axe rule image-alt) means that an <img> element has neither an alt attribute nor any other accessible name, and it is not marked as decorative either. Screen readers then often read out the file name or skip the image without any hint. The fix: give every informative image an alt attribute that conveys its message in context, and give every purely decorative image an empty alt="".
What the message actually checks
The rule looks at every <img> element on a page. It passes if the image has an alt attribute (even an empty one), is named via aria-label or aria-labelledby, or is explicitly marked as decorative with role="none" or role="presentation". If none of these is present, the image fails WCAG success criterion 1.1.1 “Non-text Content” (Level A).
One important point: the rule only checks whether a text alternative exists, not whether it is right. alt="IMG_2041.jpg" or alt="image" passes the automated test but helps nobody. Conversely, alt="" is not an error but the correct markup for an image that carries no information of its own. A missing alt attribute and an empty one mean completely different things.
Who a missing text alternative shuts out
Blind and severely visually impaired people access image content through screen readers and braille displays. Without an alt attribute, a screen reader reads out the file name, the image URL or nothing at all, depending on the combination. It is especially critical for a linked image, because then the link destination remains unknown too.
Text alternatives also appear when images do not load, for example on a weak connection or when content is blocked. Search engines use them to understand images as well. The most important reason, though, is that information that only exists in an image is otherwise lost for some of your visitors.
Finding the affected images
- Open the finding in the test report and note the page, the selector and the HTML snippet; these usually already reveal the file name or CSS class of the image.
- Open the page in your browser, right-click the image and choose “Inspect”. In the console, document.querySelectorAll('img:not([alt])') lists every image without any alt attribute.
- Work out where it comes from: is the image part of a post, the theme (logo, icons), a plugin (slider, Instagram feed, cookie banner) or a third party (tracking pixel, review widget)?
- Group the findings by cause. An image in the theme header produces a finding on every page but is fixed with a single change.
Choosing the right fix
For each image, first decide what job it does on this page. The decision tree from the W3C Web Accessibility Initiative (WAI) helps with borderline cases. The article “Writing good alt text” explains in detail how to word the text; this guide is about the technical fix.
- Informative image: the alt attribute conveys the message in context, for example <img src="team.jpg" alt="Our team of five in front of the workshop">.
- Decorative image: set alt="" without a space. Do not leave the attribute out, or the finding remains and screen readers keep guessing.
- Linked image or logo: the text names the destination, not the appearance, for example alt="Muster Bakery, home page" instead of alt="Logo".
- Image of text: the text alternative contains the text visible in the image, such as the offer on a banner.
- Complex graphic: a short text alternative names the topic, and the full description or data table sits right next to it in the text.
Fixing it in WordPress, shops and templates
In the WordPress Image block you will find the “Alternative text” field in the sidebar. If it stays empty, the Image block usually outputs an empty alt attribute. If the attribute is missing completely, the image therefore often comes from the theme, a page builder or a plugin. Also note: alt text stored in the media library is applied to newly inserted images; blocks that are already in place keep their own text.
In theme code, the wp_get_attachment_image() function is preferable to a hand-written <img> tag because it outputs the alt text from the media library. Shop systems and site builders usually provide a dedicated field for product and gallery images; use it for every product photo. For plugins or embedded services you cannot change, report the finding with its selector to the vendor.
The rule does not check CSS background images. If such an image carries information, for example text in a hero banner, that information belongs on the page as real text.
Special cases: SVG, graphics with a role and image inputs
Related rules report the same problem on other elements. svg-img-alt covers SVG graphics with role="img": they need a <title> as their first child or an aria-label. role-img-alt covers other elements with role="img", and input-image-alt covers a submit control of the form <input type="image">, whose alt attribute must name the action, for example alt="Search".
Hide purely decorative inline SVGs, such as an arrow next to a link text, from assistive technologies with aria-hidden="true". Icons from icon fonts have no text alternative; if an icon stands alone in a link or button, that control needs a name of its own.
Checking that the fix works
Run the website check again for the affected pages. In your browser’s developer tools, also check the computed name of the image in the “Accessibility” panel. Listen to important images in context with a screen reader: does the text alternative make sense together with the heading and caption, or does it just repeat the text next to it? axe reports that kind of repetition separately as image-redundant-alt.
Agree on a simple rule for your editors: every new image gets either a fitting text alternative or a deliberately empty field when it is inserted. That way the finding does not come back with the next post.
Sources & review status
Here you’ll find the original sources for this article. Last checked on .
- W3C: Understanding Non-text Content (1.1.1)
- W3C WAI: An alt decision tree
- Deque: axe rule image-alt
- MDN: The img element and its accessibility
- WordPress: Image block and alt text
Legal requirements depend on the country, the provider and the specific offer. This article explains the basics and practical steps. Test results apply to their documented scope and date.