Image alt text: where accessibility and SEO agree, and where they don't

Updated Published 8 min read

In short

Alt text is a text alternative that serves the same purpose as the image for someone who cannot see it. WCAG 2.2 Success Criterion 1.1.1 requires it for meaningful images and requires purely decorative images to be given an empty alt attribute so assistive technology skips them. Good alt text is also what Google uses to understand an image, so accessibility and SEO agree almost everywhere — except that keyword-stuffed alt text serves neither.

Key points

  • An empty alt attribute (alt="") is the correct, standards-required markup for a purely decorative image — it is not the same as omitting the attribute, which leaves screen readers to announce the filename.
  • WCAG 2.2 SC 1.1.1 is a normative requirement, so alt text is a legal-compliance question in many jurisdictions, not only an SEO one.
  • Alt text describes the image's purpose in context; the same photograph needs different alt text on a product page and in a news article.
  • Google's image documentation and the accessibility standard want the same thing — descriptive, specific, natural text — so keyword-stuffed alt text fails both.
  • Alt text and captions are different: a caption is shown to everybody and adds information, while alt replaces the image for someone who cannot see it.

Alt text is unusual among SEO topics in having an actual normative definition. It is not a best practice someone inferred from a ranking correlation — it is a requirement in WCAG 2.2 Success Criterion 1.1.1, Non-text Content, which in many jurisdictions carries legal weight.

That is worth starting with, because it settles most of the arguments. Where SEO advice and the accessibility standard disagree, the standard is the one with an authority behind it.

What alt text is for

The definition in the standard: a text alternative that serves the equivalent purpose for someone who cannot see the image.

"Equivalent purpose" is the operative phrase, and it is why there is no single correct alt text for a given image. The same photograph of a blue ceramic mug needs different alt text depending on what it is doing:

  • On a product page: the product is described in the surrounding text, so the image's job is to show the object. alt="Blue ceramic mug with a rounded handle, seen from the side".
  • In an article about a pottery studio: the image illustrates a point. alt="A potter's hand steadying a blue mug on the wheel".
  • As a decorative divider between sections: it carries no information. alt="".

Ask what a reader would lose if the image did not load, and write that. If the answer is "nothing", say so with an empty alt.

The empty alt attribute, which people get wrong

The single most common alt-text mistake is not knowing that alt="" and a missing alt attribute are different things.

  • <img src="divider.png" alt="">correct for decorative images. A screen reader skips it entirely, which is what you want for a flourish, a spacer or a background texture.
  • <img src="divider.png">a defect. With no attribute at all, assistive technology has nothing to work with and commonly falls back to announcing the filename. A listener hears "divider dot P N G", or worse, "I M G underscore 4 0 3 2 dot J P E G".

This is where a lot of SEO advice actively misleads. "Every image should have descriptive alt text" is wrong: describing decorative images clutters the experience for the people alt text exists to serve. The W3C alt decision tree is the reference for deciding which case applies, and it takes about two minutes to work through.

Note the consequence for auditing: a tool that counts "images without alt text" needs to distinguish empty from absent, or it will report thousands of correctly-marked decorative images as defects and bury the real ones.

Where SEO and accessibility agree

Almost everywhere, which is the happy part.

Google's image documentation asks for descriptive, specific, natural alt text, because that is Google's main signal for what an image depicts. The accessibility standard asks for the same thing for a different reason. One piece of writing satisfies both.

They also agree on what fails:

  • Keyword stuffing. alt="blue mug ceramic mug buy mug coffee mug best mug" is unusable to a listener and is explicitly discouraged by Google. It fails both audiences at once, which is a rare kind of efficiency.
  • Restating the filename. alt="IMG_4032" is not a text alternative.
  • "Image of…" prefixes. Screen readers already announce that it is an image. Starting with "Image of" makes every image announce itself twice.

Alt text is not a caption, and not a filename

Three different fields, routinely conflated in WordPress because the media library shows them together:

  • Alt text replaces the image for someone who cannot see it. Not displayed. Required for meaningful images.
  • Caption is displayed to everyone and adds information the image does not carry — a name, a date, a credit. Optional, and it does not substitute for alt text.
  • Filename is a weak secondary signal for search. blue-ceramic-mug.jpg beats IMG_4032.jpg, and neither is a substitute for the attribute.

If a caption already describes the image fully, the alt text can be brief or, in some cases, empty — repeating the caption verbatim makes a screen reader say it twice. That is a judgement call the decision tree covers.

Doing this across thousands of images

A media library that has accumulated for years will have thousands of images with no alt attribute, and nobody is going to write them by hand. What works:

  1. Count what you actually have, separating absent from empty. Absent is the defect; empty may well be correct.
  2. Sort by where the images appear. An image on a page that ranks and gets traffic matters more than one in a 2018 post nobody visits. This is the same triage logic as meta descriptions at scale.
  3. Handle product images with structured data. If you hold a product name, colour, material and angle, you can generate accurate alt text from fields rather than by looking at the picture. This is the highest-yield automation available, and it needs no AI at all.
  4. Hand-write the images that carry an argument — charts, diagrams, screenshots showing a step. These are the ones where a generic description loses real information, and there are fewer of them than you think.
  5. Mark decoration as decoration. Setting alt="" on genuinely decorative images is a real fix, not a way of dodging the work.

A note on generating alt text automatically

Vision models can describe an image, and for a photograph with no context that is genuinely useful. Two limits worth knowing before relying on it:

  • A model describes the image; alt text describes its purpose in context. A model looking at a chart will often describe it as "a line graph with a blue line" — accurate, and useless. What the reader needed was the finding the chart shows, which is in the surrounding text, not the pixels.
  • It cannot tell you what is decorative. Decorative is a fact about the image's role on the page, not about its content. A model asked to describe a divider will describe it.

The reasonable division is: generate for catalogue and photographic images where the content is the meaning, and hand-write for anything that carries an argument. Metaly is being built with bulk alt text in scope, and it is not built — it needs a vision provider path that does not exist yet, and whether it ships in v1 is still an open decision. Its product page lists exactly what is and is not implemented today.

The short version

  • Meaningful image: describe its purpose in context, specifically and naturally.
  • Decorative image: alt="", never a missing attribute.
  • No "image of", no keyword stuffing, no filenames.
  • Audit by counting absent attributes separately from empty ones.
  • Triage by traffic; generate from structure where you can; hand-write anything that argues.

Sources

Technical claims in this guide are drawn from the primary documentation and specifications below, each confirmed live on the date shown.

  1. Understanding Success Criterion 1.1.1: Non-text Content W3C Web Accessibility Initiative. Accessed .
  2. An alt Decision Tree W3C Web Accessibility Initiative. Accessed .
  3. Google Images best practices Google Search Central. Accessed .

FAQ

Is alt text a ranking factor?
Alt text is Google's primary signal for understanding what an image depicts, so it affects image search and contributes to page context. It is more accurately described as how an image becomes findable than as a ranking factor for the page. It is also a WCAG 2.2 requirement, which in many jurisdictions makes it a compliance question rather than an optimisation one.
Should every image have alt text?
No. Every image needs an alt attribute, but purely decorative images should have an empty one — alt="" — so assistive technology skips them. Describing a decorative divider clutters the experience for the people alt text exists to serve. What no image should have is a missing attribute, because screen readers then commonly fall back to announcing the filename.
What is the difference between alt="" and no alt attribute?
They are opposite instructions. An empty alt attribute tells assistive technology the image carries no information and should be skipped, which is the correct markup for decoration. A missing attribute tells it nothing, and many screen readers respond by reading out the filename — so a user hears something like 'I M G underscore 4 0 3 2 dot J P E G'.
How long should alt text be?
Long enough to serve the same purpose as the image and no longer — usually one clear sentence. There is no character limit in the standard. A complex image such as a chart or a diagram often needs a longer description elsewhere on the page, with the alt text pointing at it, because the useful content is the finding rather than the shapes.
Is a caption the same as alt text?
No. A caption is displayed to every reader and adds information alongside the image, such as a credit or a date. Alt text is not displayed and replaces the image for someone who cannot see it. A caption does not satisfy the accessibility requirement, though if a caption already describes the image fully the alt text can be brief or empty to avoid a screen reader announcing the same text twice.
Can AI write alt text for me?
For photographic and catalogue images, where the content of the image is the meaning, a vision model produces usable descriptions. It is less useful for images that carry an argument — asked to describe a chart, a model typically reports 'a line graph with a blue line' rather than the finding the chart exists to show. It also cannot determine which images are decorative, because that depends on the image's role on the page rather than its content.

Check your own titles and descriptions against everything in this guide — length, truncation, gaps and duplicates — a few thousand at a time.

Open the bulk checker
Go multilingual free
Open source · your data stays yours
Start free