Alt Text That Works for Screen Readers and Search Engines Alike
Turn on a screen reader and tab through a typical marketing page. Somewhere in the middle you’ll hear it: “graphic, pexels dash 4 0 3 6 2 6 7 dash scaled dot jay peg.” Then, a moment later, the same photo again, because someone dutifully typed alt="stock photo of team collaborating in modern office" under a decorative background.
Both are failures, and they fail in opposite directions. One says nothing. The other says something nobody needed to hear.
Alt text answers a specific question
Not “what is in this picture?” The real question is: if this image vanished, what information would the reader lose?
That reframing does most of the work. It’s also what the standard is getting at — WCAG’s first success criterion, Non-text Content, requires a text alternative that serves the equivalent purpose. Purpose, not inventory. The same photograph can warrant three different alt values on three different pages, because it’s doing three different jobs.
Consider a photo of a cracked foundation wall. On a page about home inspection, the alt might be alt="Vertical crack running the full height of a poured concrete foundation wall" — the detail is the point. On a page where the same photo is atmospheric filler above an article about mortgages, it’s decorative, and the right answer is alt="".
The rules that actually matter
- Skip “image of” and “photo of.” Screen readers already announce the element. You’re making people listen to the word twice.
- Decorative means empty, not absent. Use
alt="". An empty alt tells assistive tech to skip the image cleanly. Omitting the attribute entirely often makes screen readers read the filename instead — the worst of all outcomes. - Keep it to a sentence. A common working convention is somewhere around 125 characters, which comes from practical screen reader behavior rather than any spec. Treat it as a nudge toward brevity, not a hard limit.
- No keyword stuffing. It’s user-hostile, it sounds absurd read aloud, and search engines have been discounting it for a very long time.
- Don’t repeat the caption. If a
figcaptionalready says it, the alt should add something or stay empty. Hearing the same sentence twice in a row is just noise.
The cases people get wrong
Linked images. When an image is the entire link, alt text describes the destination, not the picture. A logo linking home is alt="Home" or the site name — not “blue circular logo with abstract swoosh.”
Text baked into an image. If the image contains words, the words go in the alt. All of them. A banner reading “40% off through Friday” needs that exact information, because otherwise it doesn’t exist for anyone using a screen reader.
Charts and diagrams. Alt text is the wrong container for a data table. Give a short alt with the takeaway — alt="Line chart: monthly signups roughly doubled between March and September" — and put the underlying figures in real text nearby, where everyone benefits.
CSS background images. They have no alt attribute at all and are invisible to assistive tech. That’s fine for texture. It’s a bug if the image carries meaning.
The SEO part, told honestly
Alt text is not a magic ranking lever, and anyone selling it that way is selling something. What it does do is real and worth ten seconds per image:
- It’s the primary way search engines understand an image’s subject, which is how the image gets into image search at all.
- It contributes to the page’s topical context — modest, but genuinely additive.
- It’s the visible fallback when an image fails to load, which happens more than analytics suggests.
- For a link-as-image, it functions as the anchor text.
The filename helps too, and it’s nearly free. foundation-crack-inspection.jpg costs the same as IMG_4021.jpg. Surrounding copy and captions matter as well — captions are read by far more people than body text, which makes them a better place for detail than the alt attribute ever was. There’s more on that trade-off in our image SEO writing.
Making it stick past the first sprint
Alt text decays. Someone swaps the hero photo, the alt stays, and now it describes an image that hasn’t existed for two years.
The fix is process, not heroics. Make the alt field required in your CMS, but allow an explicit “decorative” checkbox — otherwise writers invent descriptions for spacer graphics just to get past validation. Audit periodically with a browser extension or an automated checker, remembering that tooling can only find missing alt text, never wrong alt text. Only a human reading the page can catch a description that has quietly drifted away from the picture above it.