Glossary

Alt text

Alt text is the `alt` attribute of an image: the text that conveys what the image communicates to anyone who is not seeing it. It is read aloud by screen readers, displayed when an image fails to load, and used by search engines as a description of the image. The single most misunderstood point is that the correct value is sometimes an empty string — for an image that is purely decorative, `alt=""` is right and omitting the attribute entirely is wrong.

The attribute is required, the text is not always

An image that conveys information needs alt text describing what it conveys, in context.

An image that is purely decorative — a divider, a texture, an icon beside a label that already says the same thing — takes `alt=""`, which tells assistive technology to skip it entirely.

Omitting the attribute is different from setting it empty. With no attribute, a screen reader has nothing to work with and commonly reads the filename, which is worse than silence.

An image inside a link with no other text must describe the link's destination, because it is the only thing the user has to act on.

What to write

What the image communicates here, not an inventory of what is in it. The same photograph needs different alt text on a news article and on a product page.

As short as the meaning allows. A sentence is usually enough; a paragraph belongs in the page, not in an attribute.

No "image of" or "picture of". The technology already announces that it is an image, so the prefix is repeated on every one.

Text that appears in the image must be in the alt text, since it is otherwise unavailable to anyone who cannot see it.

For a chart or a diagram, the alt text gives the conclusion and the page gives the data. A description of the axes helps nobody.

Alt text and captions are different

A caption, in a `figcaption`, is shown to everyone and adds context the image does not carry on its own.

Alt text replaces the image for those who cannot see it and is shown to nobody else.

When a caption fully describes the image, the alt text can be empty rather than repeating it — otherwise a screen reader user hears the same sentence twice.

The `title` attribute is neither: it produces a tooltip on hover, is unavailable on touch devices, and is announced inconsistently. It is not a substitute for `alt`.

How to check it

Missing attributes are mechanically detectable: an `img` element with no `alt` is a finding without exception.

The filename-as-alt-text pattern — `alt="IMG_4832.jpg"` — is equally detectable and is always wrong.

Very long alt text, beyond a couple of hundred characters, usually means content that belongs on the page.

Whether the text is accurate requires looking at the image. This is the part no automated check does, and it is the part that decides whether the attribute is useful.

Frequently asked questions

Should decorative images have alt text?
They should have an empty alt attribute. That tells assistive technology to skip them. Omitting the attribute entirely is not the same and is worse.
Does alt text help SEO?
It describes the image to search engines and is used for image search. The primary reason to write it is accessibility, and that reason is sufficient on its own.
How long should alt text be?
As short as the meaning allows, usually a sentence. Anything longer generally belongs in the page content rather than in an attribute.

Sources

Related

VeriFixScan crawls a site and applies its checks to every page it reaches, keeping the evidence behind each finding. Scanning one website is free.

Scan a website