Techniques for WCAG 2.0

On this page:

-

# F38: Failure of Success Criterion 1.1.1 due to omitting the alt-attribute for non-text content used for decorative purposes only in HTML

## 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 for images that should be ignored by AT. If there is no alt attribute at all assistive technologies are not able to ignore the non-text content. The alt attribute must be proved and have a null value (i.e., `alt=""` or `alt=" "`) to avoid a failure of this Success Criterion.

Note: Although `alt=" "` is valid, `alt=""` is recommended.

## Examples

- Failure Example 1: Decorative images that have no `alt` attribute

## Resources

No resources available for this technique.

## Related Techniques

(none currently listed)

## Tests

### Procedure

1. Identify any `img` and `applet` elements that are used for purely decorative content;

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

3. Check that the `alt` attribute for these elements is null.

### Expected Results

- if step #2 or step #3 is false, this failure condition applies and content fails the Success Criterion.

- Top
- Contents
- Intro
- Previous: Failure F37
- Next: Failure F39