Accessibility (original) (raw)
Accessibility legislation means that all content published on public sector websites, including charts, must meet the level A and AA success criterion in the Web Content Accessibility Guidelines 2.1.
Other accessibility considerations
Using sgplot does not guarantee accessibility. The Analysis Functionchart guidance contains detailed information on other considerations that should be made. Not all of these are repeated here, but we think the following are a good place to start:
- Consider what type of chart is best to convey your message. Keep it as simple as possible.
- Plot titles should be provided in the body of the page, not embedded within the image of the plot. This does pose the risk of the plot image being re-shared without the title and losing context, however it is usually preferable to prioritise accessibility.
- All plots must have alt text (this may be in the code behind an image of the plot, but could also be a table of data or a text description of the message the chart is presenting).
- Take great care if using a stacked bar chart. Keep the number of categories to a minimum, and carefully consider the order of categories and bars.
- If horizontal text is difficult to read (for example, if axis labels are overlapping), consider a different chart orientation or type.
- If using a bar chart, the gap between bars should be narrower than the width of a single bar. The R Graphics cookbook describes how to do this.
- Use commas as thousands separators in axis labels or text annotations.
- Ask for feedback from colleagues and users.