“Providing a text alternative that describes media such as images or audio narration is important for people with compromised vision. The primary way to make our media accessible is by creating ALT tags for images and text transcripts for audio.” [1]
Alternative Text (or Alt Text) is text information that is added to non-text elements such as images, icons, and buttons. Alt text allows interpretation for people with comprised vision, but it also allows interpretation for individuals who turn off images on a browser (in instances such as low bandwidth or poor connections) and programs such as web browsers.
To add alt text to an image, use an alt tag followed by the alternative text in your HTML.
<img src="https://..." alt="Alternative Text here.">
Images should include equivalent alternative text, meaning that users who view the alt text will get an equal experience to users that do not. This can be accomplished by following these best practices when building a web page:
Correct Alt Text: Google Chrome logo.
Incorrect Alt Text: Image of the current Google Chrome logo, which has been used since 2014. Previous versions of the logo have been used since the web browser debuted in 2008.
***If the historical aspects of the logo are important, they should be included in the page's text, not within the alt tag.***
Don't write context into the alt text that would benefit everyone. Consider adding the information to a paragraph around the image instead of inside the alt text.
If you absolutely need to include a long description, include a short description in the alt text and then provide a link to the longer description.
Correct Alt Text: Bar chart showing monthly and total visitors for the first quarter 2014 for sites 1 to 3.
Image Description
Incorrect Alt Text: Overview: The chart shows the website hits for the first quarter of 2014. It shows that Site 1 has more visitors than either of the other sites, but the number of visitors is decreasing. Site 2 has a fairly constant number of visitors, while for Site 3 page hits are increasing month on month. Values: Numerical values presented on the image: 2014 First Quarter visitors per site (in thousands). Presentation: The bar chart represents both the number of visitors per month for each website, and the total number of visitors per website for the entire quarter. Website visitors for each month are represented using columns lined up horizontally, with heights indicating the number of visitors. A fourth column is provided for each website with the accumulated site visitors for the quarter.
Alternately...
If you have included a textual breakdown of the chart somewhere else on the page, you could include that information in the alt text. (e.g., alt="Bar chart showing monthly and total visitors for the first quarter 2014 for sites 1 to 3. Described under the heading Site visitors full text." OR alt="Bar chart showing monthly and total visitors for the first quarter 2014 for sites 1 to 3, described in detail below.")
Example taken from W3C page Complex Images. [4]
Correct Alt Text: <img alt="">
Incorrect Alt Text: Green vine decorating the site.
***This image is purely decorative and serves no function other than filling blank space for aesthetic purposes. Describing the image may cause confusion to users because it could be interpreted as an image that is important to the information on the page. However, failing to include the alt tag could also cause confusion because it could imply the user is missing important information on the page.***
Correct Alt Text: University of Tennessee, Knoxville logo.
Incorrect Alt Text: Image of University of Tennessee, Knoxville logo.
***If you include "image of" in your alt tag, a screen reader may read "Image, Image of University of Tennessee, Knoxville logo."***
Correct Alt Text: Navigate to the previous slide.
Incorrect Alt Text: Blue circle with a white arrow pointing left.
***Describing the image will not help visually impaired users to navigate the page.***
Page: Information about the University of Tennessee.
Alt Text: Smokey, a bluetick coonhound, that serves as the University of Tennessee's live mascot.
Page: Photography course about the usage of color.
Alt Text: A bright orange background contrasts against the darker subject matter.
From the W3C website Non-text Content: Understanding SC 1.1.1 [5]
Sometimes there is non-text content that really is not meant to be seen or understood by the user. Transparent images used to move text over on a page; an invisible image that is used to track usage statistics; and a swirl in the corner that conveys no information but just fills up a blank space to create an aesthetic effect are all examples of this. Putting alternative text on such items just distracts people using screen readers from the content on the page. Not marking the content in any way, though, leaves users guessing what the non-text content is and what information they may have missed (even though they have not missed anything in reality). This type of non-text content, therefore, is marked or implemented in a way that assistive technologies (AT) will ignore it and not present anything to the user. [e.g., by using a null tag <img alt=""> ]
Sometimes content is primarily intended to create a specific sensory experience that words cannot fully capture. Examples include a symphony performance, works of visual art etc. For such content, text alternatives at least identify the non-text content with a descriptive label and where possible, additional descriptive text. If the reason for including the content in the page is known and can be described it is helpful to include that information.