Glossary · Beginner
Alternative text
Alternative text replaces the purpose or information an image contributes when that image cannot be seen or loaded.
- Published
- Last checked
Definition
Alternative text is the textual replacement for an image's contribution in its
current context. For img, it is supplied through the alt attribute. It is
not a caption, filename, or exhaustive visual inventory.
Informative and functional images
An informative image needs the information a person would otherwise miss. A functional image inside a link or button needs the destination or action. The same asset can require different alternatives on different pages because its purpose changes.
Decorative images
When nearby text already communicates everything and the image adds no task
information, alt="" marks it decorative. Omitting the attribute can cause a
screen reader to announce a filename or URL instead.
Complex images
Charts, maps, and diagrams usually need a short identification plus a nearby explanation, data table, or other complete equivalent. Packing the entire analysis into one long attribute is difficult to navigate and maintain.
Common failures
- Starting every value with “image of.”
- Copying a caption word for word.
- Using generated descriptions without page context.
- Leaving stale text after the image changes.
- Putting essential text only inside the image.
Review question
If the image were unavailable, would the alternative and surrounding text let a person understand the same fact or complete the same action without redundant announcements?
Review the answer again whenever the asset, link destination, caption, or nearby copy changes; alternative text is contextual content, not permanent file metadata.