Techniques for WCAG 2.0

On this page:

-

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

## Applicability

HTML and XHTML documents that load images.

This technique 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

The purpose of this technique is to show how images can be marked so that they can be ignored by Assistive Technology.

If no title attribute is used, and the alt text is set to null (i.e. `alt=""`) it indicates to assistive technology that the image can be safely ignored.

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

Note: Have a "null" ALT attribute is not the same as having no ALT attribute.

## Examples

### Example 1

The following image is used to insert a decorative image on a Web page.

Example Code:

    <img src="squiggle.gif" width="20" height="20" alt="" />

## Resources

Resources are for information purposes only, no endorsement implied.

- 'Null alt text' in WebAIM's 'Creating Accessible Images' also shows how to do this in Dreamweaver.

## Related Techniques

(none currently listed)

## Tests

### Procedure

For each image that should be ignored.

1. Check that `title` attribute is either absent or empty.

2. Check that `alt` attribute is present and empty or contains only whitespace (but not `&nbsp;`)

### Expected Results

- #1 and #2 are true

- Top
- Contents
- Intro
- Previous: Technique H65
- Next: Technique H69