Keep the alt text short, name the type of chart, state its main point, and put the full detail somewhere visitors can read it. A long chart doesn't become a long alt attribute.
Charts do help many readers. WebAIM, an accessibility group, says illustrations, maps and charts "can enhance comprehension, especially for those with cognitive and learning disabilities".1 So don't drop them. Just describe them well.
What goes in the alt text
Section508.gov, a US government site, gives a short recipe for charts, graphs, diagrams and infographics.2
- Say what type of chart it is, such as a pie chart or bar graph.
- Think about why the image sits where it does. Describe the important trends, relationships and highlighted parts.
- Don't repeat what the paragraph beside the chart already says.
- Avoid overly long descriptions.
WebAIM agrees that the alt text "should still describe the general content of the image".3
Take a bar chart of takings by day. Weak alt text says only "Sales graph". Section508.gov marks that kind of label as unhelpful.2 Stronger alt text names the chart type, the period, and the pattern. Here's an invented example. The alt text reads: Bar chart of weekly takings by day. Takings stay low early in the week and climb on the weekend.
Where the full data goes
When the description won't fit in a short alt attribute, WebAIM says the fuller version must be provided elsewhere. It "might be an adjacent data table on the same page, or it might be on a separate web page, linked from the page with the image".3
Section508.gov takes the same line. If an image is very detailed, include a short description in the alt text, then give a link to the data table or a longer description beneath the image.2
For a small site, a plain table under the chart is usually the simplest route. Everyone can read it, it can be searched, and no one has to hunt for a hidden link.
You may see advice to use a longdesc attribute. WebAIM says it's deprecated and shouldn't be used.3
Diagrams and flowcharts
Section508.gov says flow charts, decision trees and similar diagrams must have alt text that describes the order of the actions or the relationships of the decisions.2
For an organisation chart, it suggests a bulleted list might suit screen reader users better, or a graphical diagram with a bulleted list alongside.2 That works for simple process diagrams too. A step-by-step list says the same thing as the arrows do.
Here's another invented example, for an ordering process. The alt text reads: Flowchart of the order process. A customer asks, you quote, they approve, you start. That's short enough to read in a breath.
Maps
Maps are a close cousin. WebAIM covers image maps, where parts of a picture are clickable. The main alt conveys the content, and each clickable area gets its own alt.3 For a plain map, treat it as a complex image. Say what area it shows and what the viewer should notice, and put any list of places or directions in text.
Quick check
Cover the chart and read only your alt text and the text around it. Could a visitor act on the same information you'd want a sighted reader to take away? If not, the point of the chart is missing.
If the chart's data matters, put it where everyone can reach it. Then run through the steps for reviewing a page.
Sources used
- WebAIM: Accessible Images, WebAIM
- Authoring Meaningful Alternative Text, Section508.gov (US General Services Administration)
- WebAIM: Alternative Text, WebAIM
