Accessibility
Accessibility is a large topic, and this page is not an in-depth guide. It brings together the accessibility practices that appear throughout the data visualisation guidelines, so you can see them in one place, and points to further reading at the end.
Describe every chart in text
Give every chart a text alternative, so people who can’t see it still get the message. Say what type of chart it is, what data it shows and the main point, for example “Line chart of monthly container volume for three trade lanes. Asia–Europe is highest throughout.”
Your charting library may be able to generate a description for you, as ECharts can. A generated description can only list the data, so write the key message yourself. See the ECharts and Chart.js accessibility guides.
For a complex chart, such as one with several series or many points, a short description may not be enough. Provide the data as a table near the chart as well.
Don’t rely on colour alone
Some people find it hard to tell colours apart, and charts may be printed in greyscale. Wherever colour carries meaning, add a second cue. The guidelines cover these:
- Marker shapes for line series, a different shape for each series. See Lines and markers.
- Patterns on filled series, as an option people can switch on. See Fills and patterns.
- Direct labels on series, or a legend that matches each series’ colour, marker or pattern. See Labels and legends.
- Labelled bands for status ranges such as red, amber and green, and dashed lines for references and forecasts. See Annotations.
Use the Extended colours in order
The MDS Extended colour palettes are ordered so that neighbouring palettes contrast well, which keeps neighbouring series easy to tell apart. Assign them in order and keep each series’ colour the same across charts. Show no more than six named series, so each keeps its own colour, and use a neutral colour for “Other”. See Data series and Colours.
Keep text readable
Keep axis and category labels horizontal and easy to read, print values only where they stay legible, and keep labels and notes clear of the data. Shorten text or show fewer labels before you make text smaller. See Typography, Axes and grid and Labels and legends.
Don’t hide what matters behind interaction
Hover and tooltips aren’t available on touch screens or to people who navigate with a keyboard. Don’t rely on tooltips, hover or highlighting to convey essential information. Keep the main message, important values and series names visible, and make sure the data is available as text, or as a table for complex charts. See Interaction.
Further reading
- Chartability, a set of heuristics for testing the accessibility of data visualisations and interfaces.
- W3C: complex images, how to write text alternatives for charts and graphs.
- Writing alt text for data visualization, Amy Cesal’s practical guide in Nightingale.
- Data visualisation: charts, UK Government Analysis Function guidance, including accessibility.
- WCAG: use of colour and WCAG: non-text contrast, the WCAG success criteria for colour and contrast.