Techniques for WCAG 2.0

On this page:

-

# F65: Failure of Success Criterion 1.1.1 due to omitting the alt attribute on img elements, area elements, and input elements of type "image"

## Applicability

HTML and XHTML

This failure relates to:

- Success Criterion 1.1.1 (Non-text Content)
  - How to Meet 1.1.1 (Non-text Content)
  - Understanding Success Criterion 1.1.1 (Non-text Content)

## Description

This describes a failure condition for text alternatives on images. If there is no alt attribute, then assistive technologies are not able to identify the image or to convey its purpose to the user.

Some Assistive Technology might attempt to compensate for the missing alt text by reading the file name of the image. But it is insufficient to rely simply on the file name for many reasons. For example, file names may not be descriptive (e.g., images/nav01.gif), and technology specifications do not require descriptive file names. Some assistive technology may not read the file name if alt text is absent.

## Examples

### Example 1: Missing alt text

In the code example below, the person using a screen reader would not know the purpose of the image.

Example Code:

    <img src="../images/animal.jpg" />

## Resources

No resources available for this technique.

## Related Techniques

- H67: Using null alt text and no title attribute on img elements for images that AT should ignore

## Tests

### Procedure

1. identify any `img`, `area` and `input` elements of type "image"

2. check that the `alt` attribute for these elements exists.

### Expected Results

- If check #2 is false, this failure condition applies and content fails the Success Criterion.

- Top
- Contents
- Intro
- Previous: Failure F63
- Next: Failure F66