How to write alt text: rules that actually work

Published 25 October 2026

In short: alt text should carry what the image does for the page - its content or its function - not a catalogue of everything visible in it. If the image is decorative or redundant, the right alt text is an empty one. Missing alt text is the second most common automatically detected WCAG failure: WebAIM found it on 55.5% of one million home pages in 2025.

What is alt text for?

Screen readers announce the alt attribute in place of the image. Browsers also show it when the image fails to load, and search engines use it to understand the image. Every one of those uses is about the image's purpose in context, not about describing pixels exhaustively.

The rules that matter

  • Convey function and content: for a linked logo, "Acme home" beats "blue rectangle logo". For a chart, give the takeaway, not every data point.
  • Skip "image of" or "picture of": screen readers already announce the element as an image.
  • Keep it short: usually under about 125 characters. If the content needs more, put the long version in nearby text.
  • Don't repeat adjacent text: if the caption already says it, use alt="".
  • Never stuff keywords: alt text is a user feature first; keyword stuffing hurts trust and reads terribly out loud.

When should alt be empty?

Decorative images - dividers, background flourishes, icons that duplicate a visible label - should have alt="" (an empty attribute). That tells the screen reader to skip the image. A missing alt attribute is the mistake: many screen readers then read the filename out loud, which is worse than either choice.

How do I check my pages?

Automated tools reliably flag missing alt attributes; judging quality needs a human read in context. Our free web scan flags missing alt text on any public page with a dated report. It finds only part of all accessibility issues and does not certify conformance.

From the same small team: Memory Quest, a free memory-training game for Android, on Google Play.

Sources