Alternative Text
Alternative text conveys the purpose or information of non-text content to people who cannot perceive the visual or audio presentation.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/alternative-text/
01What it means
Alternative text is a text equivalent chosen for a non-text item in its context. For HTML images it is commonly supplied through the alt attribute, but the correct treatment depends on purpose: informative images need concise equivalents, functional images need the action's name, complex images need fuller explanation, and decorative images should usually be ignored by assistive technology.[1][2]
- 01InformativeConcise equivalent of the information contributed
- 02FunctionalName the action or destination
- 03ComplexProvide structured visible explanation or data
- 04DecorativeRemove from the accessibility experience
Review with images unavailable and assistive technology; nearby text may already provide some or all of the needed equivalent.
02Why it matters
Text alternatives let screen-reader users understand meaningful images and let content survive when images fail to load. Writing for purpose rather than appearance keeps the equivalent useful and avoids cluttering output with decorative detail.
03When to use it
Decide an alternative for every image, icon, chart, diagram, and other non-text item. Use empty alternatives for genuinely decorative images, visible text or adjacent explanation for complex content, and labels that describe the action for image controls.
04How it works
- Determine why the non-text item exists in this specific context and what information or action it contributes.
- Write a concise equivalent for informative content without repeating nearby text.
- Name the destination or action for functional images rather than describing their appearance.
- Provide structured visible explanation or data for complex charts and diagrams.
- Mark decorative content to be ignored and review alternatives with images unavailable and a screen reader.
05A practical example
A revenue chart is followed by a short visible summary of the trend and an accessible data table. Its concise alternative identifies the chart and key change, while a decorative gradient behind it uses an empty alternative and is not announced.
06Where it breaks
No short description can preserve every visual detail, and purpose changes across contexts. Automatically generated text may hallucinate or expose sensitive attributes, while overly long alternatives burden navigation and duplicate visible content.
Common mistakes
- Describing appearance without conveying the image's purpose.
- Omitting alt text instead of intentionally marking an image decorative.
- Repeating captions or surrounding text word for word.
- Using a filename or generic phrase such as “image” as the alternative.
07Sources
- Images TutorialW3C Web Accessibility Initiative · Accessibility tutorialImages Tutorial
- Understanding Success Criterion 1.1.1: Non-text ContentW3C Web Accessibility Initiative · Standards guidanceUnderstanding Success Criterion 1.1.1: Non-text Content