Individuals with visual disabilities or other cognitive impairments often cannot perceive information conveyed through images without help from a textual alternative. Image-based content that impedes accessibility includes charts, graphs, and other non-textual content.
Textual alternatives accompany images in order to make the content and purpose of images accessible. All alternatives need to be compatible with screen-reading software.
Alternative text for images on web pages is provided via the alt attribute on the
<input type="image"> tags. Always include the
alt attribute on these tags.
Alternative text used should follow these considerations:
- If the image is necessary for understanding the page content, equivalent information should be communicated as text using the
- If the image is decorative and not necessary for understanding the page content, the
altattribute should be empty (alt="").
- Empty attributes tell screen-reading software to completely ignore the image.
- If an image is used inside of a link or as a button, the alternative text should describe the link's destination or the button's purpose.
These measures allow users with visual disabilities to understand information communicated using images, as well as the destinations or purpose of image links and controls.
These measures also instruct screen reading software to ignore decorative-only images, which makes navigating content faster and easier.