Alternative text provides a textual alternative to non-text content in webpages.
Functions of alternative text
Alternative text services several functions:
It is read by screen readers in place of images. This allows images to be accessible to users with visual or certain cognitive impairments.
It is displayed in place of the image in browsers if the image file is not loaded.
It provides a semantic meaning and description to images which can be read by search engines.
Presenting alternative text
Alternative text can be presented in two ways. It can be within the alt attribute of the image element or within the context or surroundings of the image itself.
If the image has a lot of information, charts, diagrams, etc., the alt text should contain 1) a short description conveying the essential information presented by the image, and 2) a long description following the image or on another page.
Helpful tips for writing alternative text
Context is everything. The alternative text is based upon the context of the image. The alternative text may be completely different for the same images, depending on the context and content on the web page.
Be accurate and equivalent.
Be succinct. Typically no more than a few words is necessary. Rarely, however, a short sentence or two may be appropriate.
Do not use the phrases, "image of..." or "graphic of..." to describe the image.