---
title: Image Alt Text | Accessibility Rule
description: Images must have alternate (alt) text
source_url:
  html: https://testingbot.com/support/accessibility/web/rules/image-alt
  md: https://testingbot.com/support/accessibility/web/rules/image-alt/index.md
---
# Ensure \<img\> elements have alternative text or a role of none or presentation

Rule ID: image-altUser Impact: criticalGuidelines: WCAG 2.0

Ensure that all `<img>` elements include appropriate alternative text to convey their purpose and meaning to users who rely on assistive technologies.

## About This Rule

This rule ensures that all images have appropriate alternative text, enhancing accessibility for users who rely on screen readers. Adhering to this guideline aligns with the following standards:

- [WCAG 2.1 (A): 1.1.1 Non-text Content](https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html)
- [WCAG 2.0 (A): 1.1.1 Non-text Content](https://www.w3.org/TR/UNDERSTANDING-WCAG20/text-equiv-all.html)

## Why It Matters

Screen readers cannot interpret images directly. Without alternative text, users who are blind or have low vision miss out on the information conveyed by images. Providing descriptive alternative text ensures that all users have equal access to the content and functionality of a webpage.

## How to Fix

To make images accessible:

- **Informative Images:** Add a concise and descriptive `alt` attribute to each informative image, summarizing its content or function. For example: 

    <img src="cat.jpg" alt="A drawing of a cat">

- **Decorative Images:** For images that are purely decorative and do not convey meaningful information, use an empty `alt` attribute to allow screen readers to skip them: 

    <img src="decorative-line.jpg" alt="">

- **Complex Images:** For images requiring more detailed descriptions, consider providing additional context within the surrounding text or using a `<figure>` and `<figcaption>` combination. 

### Alternative Text Writing Tips

When crafting alternative text, consider the following:

- Convey the intent, purpose, and meaning of the image.
- Avoid redundant phrases like "image of" or "picture of."
- Keep it concise but informative, typically under 125 characters.
- Ensure it complements the surrounding content without duplicating information.

### Other resources ###

Below are some other resources you can check when dealing with image alt text approaches.

- [A Simple Alt Text Decision Tree (HTML5 Specification)](https://www.w3.org/WAI/tutorials/images/decision-tree/)
- [F65: Failure of Success Criterion 1.1.1 due to omitting the alt attribute or text alternative on img elements, area elements, and input elements of type "image"](https://www.w3.org/WAI/WCAG21/Techniques/failures/F65.html)
- [H37: Using alt attributes on img elements](https://www.w3.org/WAI/WCAG21/Techniques/html/H37.html)
- [H67: Using null alt text and no title attribute on img elements for images that AT should ignore](https://www.w3.org/WAI/WCAG21/Techniques/html/H67.html)
- [ARIA10: Using aria-labelledby to provide a text alternative for non-text content](https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA10.html)

## Other Rules

Interested in other web accessibility rules? Please see these other rules:

- [input-button-name](https://testingbot.com/support/accessibility/web/rules/input-button-name)
- [input-image-alt](https://testingbot.com/support/accessibility/web/rules/input-image-alt)
- [label](https://testingbot.com/support/accessibility/web/rules/label)
- [link-in-text-block](https://testingbot.com/support/accessibility/web/rules/link-in-text-block)
- [link-name](https://testingbot.com/support/accessibility/web/rules/link-name)
