Skip to content

Accessibility ​

  • Each chart is an image with a text: its title and description, or a summary of the data. Write your own description for what the chart shows.
  • Points, items and tree nodes that can be clicked take the focus and answer to Enter and Space.
  • Charts do not move for people who ask for reduced motion.
  • Text in shapes is black or white, whichever reads better.
  • Colour is not always enough: add labels, or a table beside the chart.

Keyboard ​

Tab reaches the chart. Then:

KeyDoes
← →previous or next mark of the series
↑ ↓the same place in the previous or next series
Home, Endfirst or last mark of the series
Enter, Spacewhat a click on the mark does
Escapeleaves the marks

The mark gets a ring and its tooltip, and a live region says it to screen readers: Sales, Mar: 30. Lines, bars, areas, scatter points, pie slices, treemaps and most charts that show one shape by value map to their marks. The others are read row by row from their table, with nothing drawn. Rings and tooltips do not move, so they suit readers who ask for reduced motion.

Click the chart or reach it with Tab, then use the arrows. keyboard: false turns this off, for a sparkline in a list for example.

Data table ​

ts
createChart(host, spec, { table: true });      // under the chart
createChart(host, spec, { table: 'beside' });  // on the right, the drawing takes 60 %
createChart(host, spec, { table: 'toggle' });  // a Table button in the toolbar

The table is plain HTML (<table> with <th scope>), with the same rows as the CSV export and the format of the chart. It is never part of the SVG or PNG export. Style it with .nervure-table.

Safety ​

Names and categories are written as text, never parsed as HTML. decorate and colours come from your code: do not build them from what visitors type.