Provide text alternatives for non-text content that serves the same purpose.
Users who cannot see images, hear audio or perceive video benefit from having text alternatives in their place. These can be read by the user or voiced by assistive technology.
Text alternatives must therefore provide the same information as the non-text content.
How to Pass Non-text Content
- Add a text alternative to your images describing the image
- For video and audio, add a short description of the media but ideally provide a transcript
- Where a control or input field is non-text, add a name
For the following examples, you must provide a text alternative, but it doesn’t have to give the same information as the non-text content.
- Tests (if it would invalidate the test)
- CAPTCHA (but provide an accessible alternative, or even better don’t use CAPTCHA)
For these final examples, implement them in a way assistive technology can ignore them by using blank alt text.
- Decorative content that has no meaning
- Content is used solely for visual formatting
- Content that’s invisible to all users
For images, the alt text should describe the image and give the same information as the image would if seen. This isn’t always easy, and people don’t always agree on what the ‘same’ information is. Ask yourself: what does the picture convey?
If the image is your company logo, your company name is a good bet. If the image is of text, replicate the text exactly. For all other images, describe the image helpfully and succinctly: we don’t need to know it’s a picture of 17,387 trees if the word ‘forest’ will serve the same purpose.
If you do use CAPTCHA, use one with an audio alternative and add your contact details somewhere close by to help your users if they get stuck.
Blank (or null) alt text is as easy as adding an alt tag with no space between the quotes.
<img src="location-of-image.jpg" alt="" />
Screen readers will skip the image rather than reading the filename or trying to substitute an alt text.
Related to Non-text Content
- 1.4.5 – Images of Text
- 1.4.9 – Images of Text (No Exception)
- 4.1.2 – Name, Role, Value
- Understanding Success Criterion 1.1.1 (W3C)
Free Developer Resources
Join over 3,700 subscribers on my weekly web accessibility email and get free developer resources like WCAG Checklists and special offers.
Over 600 developers like you have learned more about the Web Content Accessibility Guidelines with my guidebook.