Alternative text
It is read by screen readers in place of images allowing the content and function of the image to be accessible to those with visual or certain cognitive disabilities.
It is displayed in place of the image in browsers if the image file is not loaded or when the user has chosen not to view images.
It provides a semantic meaning and description to images which can be read by search engines or be used to later determine the content of the image from page context alone.
Alt and surrounding text
"CHART TYPE of TYPE OF DATA where REASON FOR INCLUDING CHART`
+ Link to data source somewhere in the text
CHART TYPE: It’s helpful for people with partial sight to know what chart type it is and gives context for understanding the rest of the visual.
TYPE OF DATA: What data is included in the chart? The x and y axis labels may help you figure this out.
REASON FOR INCLUDING CHART: Think about why you’re including this visual. What does it show that’s meaningful. There should be a point to every visual and you should tell people what to look for.
Link to data source: Don’t include this in your alt text, but it should be included somewhere in the surrounding text.
Writing the alt text
Write alt text for the line graph.
Writing the alt text
Write alt text for the scatter plot.
Context matters for alt text
The same chart can have different valid alt texts depending on context:
“Line chart.” - If appearing in a chart-picker interface
“A line chart with five lines, titled Product Performance in 2021.” - In a design mockup
“Line chart. Product Performance in 2021. Product A is outperforming all other products.” - For a decision-maker
“Line chart. Product Performance in 2021. All products trended down sharply from January until June and slowly stabilized back into positive territory by November.” - For analysts interested in trends
Only a human author understands why they’ve made something and what their audience should know.
Automatic alt text limitations
Machine learning tools for generating alt text:
- Can extract Level 1 information (chart type, title, axis labels)
- Can sometimes extract Level 2 information (some statistical facts)
- Cannot produce Level 3 information (trends, patterns, meaning)
- Cannot produce Level 4 information (context, interpretation)
“For the foreseeable future, automatic alt texts will be incomplete. They can be used as a starting point… but these partial alt texts should be avoided altogether or edited to add Level 2 and 3 information.”