Missing Alt Attribute: Error Explained and Fixed
Also called: Image missing alt, Images must have alternate text, No alt attribute
Definition
A missing alt attribute means an img element (or an image button or image map area) has no alt attribute at all. Assistive technology cannot tell whether the image is informative or decorative and may read out the file name instead.
A missing alt attribute is the scanner error for an image tag that has no alt attribute at all. It is reported as "Image missing alt attribute" or "Images must have alternate text". This page is about the error itself – how to write good descriptions is covered in the alt text guide.
What it means
The alt attribute is how an image tells screen readers what it shows. When the attribute is missing completely, assistive technology has no information: it cannot know if the image matters or is just decoration. Screen readers may then fall back to the file name – and "IMG_4711.jpg" or "hero-banner-final-2.webp" is read aloud instead of real content.
WCAG 1.1.1 Non-text Content is a Level A criterion of WCAG 2.2: all non-text content needs a text alternative that serves the equivalent purpose, and purely decorative images must be hidden from assistive technology. W3C lists "omitting the alt attribute or text alternative on img elements, area elements, and input elements of type image" as failure F65. File names or placeholder text used as alt text are a failure too (F30).
| Markup | What the scanner says | What it means |
|---|---|---|
<img src="team.jpg"> |
Missing alt attribute | No information at all – fix it |
<img src="line.svg" alt=""> |
No error | Decorative, correctly ignored |
<img src="team.jpg" alt="Our team of five at the office"> |
No error | Informative, described |
<img src="team.jpg" alt="IMG_4711.jpg"> |
Often no error | Fails 1.1.1 anyway (F30) |
Examples
The error often hides in product images, logos and images inside links. When the image is the only content of a link or button, the missing alt also creates an empty link or empty button.
<!-- Error: no alt attribute -->
<img src="/images/sneaker-red.jpg">
<!-- Fixed: informative image -->
<img src="/images/sneaker-red.jpg" alt="Red running sneaker, side view">
<!-- Fixed: decorative image -->
<img src="/images/divider.svg" alt="">Decide for every image: informative → describe its content or purpose; decorative → alt="". Set alt text in your CMS media library, so it is used wherever the image appears.
Leave the attribute out, fill it with the file name, or write "image" or "spacer" for decorative images – W3C counts that as a failure (F39).
How to fix a missing alt attribute
Online shops are hit hardest, because every product photo counts. In Shopify and WooCommerce on WordPress, alt text can be set per image in the media or product settings.
Questions
What does "image missing alt attribute" mean?
The <img> tag has no alt attribute at all. Screen readers have no text alternative and may read out the file name instead.
Is alt="" the same as a missing alt attribute?
No. alt="" marks an image as decorative so screen readers skip it – that is correct for decoration. A missing attribute is an error, because nobody decided whether the image matters.
Do decorative images need an alt attribute?
Yes, an empty one: alt="". Leaving it out fails WCAG 1.1.1; W3C lists this as failure F65.
How do I find images without alt attributes?
Run the free WCAG scanner on your homepage. For a single image, right-click it and choose Inspect to see whether the attribute exists.
Can allyWay fix missing alt attributes automatically?
Yes. allyWay's AI looks at your images and writes alt texts that describe what is actually in them, then applies them on every page. The automatic fixes run through the allyWay script, so your CMS, theme and files stay as they are, and every fix is logged. Start for free and give your images text alternatives without editing them one by one.
Related terms
Alt text
Alt text is a short written description of an image. Screen readers read it aloud, and browsers show it when the image can't load – so people who can't see the image still get its meaning.
Read definition: Alt textEmpty Link: What the Error Means and How to Fix It
An empty link is a link element that has no accessible name – no text, no alt text on an image inside it and no aria-label. Screen readers can only announce it as a bare link, so users cannot tell where it leads.
Read definition: Empty Link: What the Error Means and How to Fix ItEmpty Button: What the Error Means and How to Fix It
An empty button is a button element with no accessible name – no text, no aria-label and no alt text on an image inside it. Screen readers announce only that it is a button, not what it does.
Read definition: Empty Button: What the Error Means and How to Fix It