What alt text is for
Alt text is the written description of an image, stored in the image's alt attribute. Screen readers read it aloud, browsers show it when an image fails to load, and search engines use it to understand what the picture shows. It is also the single most common accessibility failure on the web.
Writing good alt text
- Describe what matters about the image in context, in a sentence or less.
- Do not start with "image of" or "picture of". Screen readers already announce it as an image.
- Never use the filename (DSC_0234.jpg) or a single word like "photo".
- For images of text, repeat the text.
- For purely decorative images, use an empty alt="" so screen readers skip them. Leaving alt out entirely is different: many screen readers then read the filename.