Alt text is a written description attached to an image so that people using screen readers, and search engines, can understand what it shows. W3C accessibility guidance distinguishes informative, decorative, functional and complex images, each needing a different kind of text alternative, always based on the image's purpose in context.
Alt text exists to make images accessible to people who cannot see them, most commonly through a screen reader that reads the alt attribute aloud. The W3C Web Accessibility Initiative describes several categories that each call for a different approach. Informative images, such as photos and illustrations, need a text alternative that conveys at least the essential information the image presents. Decorative images, whose only role is visual styling with no informational content, should carry a null alt attribute so screen readers skip them rather than describing irrelevant decoration.
Functional images, such as a photo used as a clickable link or button, need alt text describing what the link or button does, not what the image looks like. Complex images that convey data or detailed information, such as a chart or infographic, need a complete text equivalent of that data or information, since a short caption cannot substitute for the actual content being conveyed visually.
The unifying principle across all these cases is that the right text alternative depends on the image's purpose and context, not on a generic visual description applied automatically. The same photograph might need different alt text depending on whether it illustrates an article, links to a page, or serves as pure decoration.
How to: 1) Classify each image as informative, decorative, functional or complex before writing its alt text. 2) For informative images, describe the essential information conveyed, not every visual detail. 3) For decorative images, use an empty alt attribute. 4) For functional images such as linked logos, describe the destination or action, not the graphic itself. 5) For complex images like charts, provide the underlying data as text nearby, not just a short alt description.
QUESTIONS
What is alt text?
It is a text description attached to an image through the HTML alt attribute, read aloud by screen readers for people who cannot see the image, and also read by search engines when they try to understand what an image shows.
Should every image have visible alt text describing it?
Not the same way. Decorative images that add no information should have an empty alt attribute so screen readers skip them; informative, functional and complex images each need alt text tailored to their specific role, not a generic description.
What alt text should a linked logo image have?
It should describe the destination or action of the link, since the image is functioning as a button or link, rather than simply describing what the logo looks like.
How should a complex image like a chart be made accessible?
By providing a complete text equivalent of the data or information the chart conveys, typically as nearby text or a linked data table, since a brief alt description cannot substitute for the full content of a complex visual.
SOURCES
Last reviewed