Skip to main content

Accessible JavaScript Charts

A chart is a picture of data. Readers who can't see the picture need the data some other way. Readers who don't use a mouse need another way to reach the values a tooltip shows.

Britecharts gives every chart these by default, with nothing to configure:

  • A name for screen readers. Each chart's svg has a role and a name, "Bar chart" until you set your own.
  • The data as a table. Every chart but the legend renders its data as a table that screen readers can read. Britecharts hides the table from sight, so it takes no room on the page.
  • Keyboard navigation. Eight charts are a stop in the page's tab order. The arrow keys move from one data point to the next. The tooltip follows focus.
  • Reduced motion. When the reader's system asks for reduced motion, charts draw without animation.
  • A palette for colour blindness, one setting away: colors.colorSchemas.okabeIto.

Each of these is free, in the plain JavaScript charts and in the React components alike.

Try it​

Press Tab until a chart has focus, then use the arrow keys. With a screen reader, move past a chart to reach its table.

Uses of each word
Uses over a week
KeyDoes
Right or Left arrowmoves to the next or previous data point: a bar, a slice, a date, a point
Down or Up arrowthe same, except on the heatmap, where they move a day
Home, Endmoves to the first or last point
Escapelets go of the point; leaving the chart does too

Name each chart​

The default name says what kind of chart it is, not what it shows. Name it after its data, and add a sentence about what it means:

barChart
.a11yTitle('Monthly visits')
.a11yDescription('Visits doubled in May');

In React, pass a11yTitle and a11yDescription as props. The data table takes the chart's name as its caption.

What each chart supports​

ChartName and descriptionData tableKeyboard
Bar, grouped bar, stacked baryesyesyes
Line, stacked areayesyesyes
Donut, heatmap, scatter plot, treemapyesyesyes
Brush, bullet, sparklineyesyesno
Legendyesnono

The bullet chart and the sparkline draw no title. Put their label in your own markup, next to the chart, and give screen readers the same words with a11yTitle.

How other libraries compare​

What each library does by default, from its own documentation, as of October 2026:

BritechartsHighchartsRechartsChart.js
Name for screen readerson by defaultwith the accessibility moduleon by default since 3.0you add aria-label and role to the canvas
Data as a tableon by default, hiddenwith the export-data modulenono; you write fallback content
Keyboard through the dataon by default, 8 chartswith the accessibility moduleon by default since 3.0no
Sonificationnoyesnono
Frameworksplain JavaScript, Reactplain JavaScript, official React, Angular, Vue and othersReactplain JavaScript, community wrappers
LicenseApache 2.0, freecommercial, from 366 USD per developer seatMIT, freeMIT, free

Highcharts goes further than Britecharts. It adds sonification and more ways to read a chart, and every license includes its accessibility module. Britecharts is the free library in this table that gives screen readers both a name and a data table by default. It also gives keyboards a way through the data.

Sources: Highcharts accessibility module, Highcharts shop, Recharts 3.0 migration guide, Recharts and accessibility, Chart.js accessibility. See also Britecharts vs Chart.js, vs Recharts and vs Highcharts.

Turn a feature off​

Each feature is on by default and has an opt-out, for pages that already provide the same thing:

To turn offCoreReactWrappers
The data table.a11yDataTable(false)a11yDataTable={false}a11yDataTable: false
Keyboard navigation.a11yKeyboardNavigation(false)a11yKeyboardNavigation={false}a11yKeyboardNavigation: false

If the page already shows the same data in an accessible form, turn off the table. If charts are thumbnails in a list, turn off keyboard navigation so they don't each take a tab stop.

How it is tested​

Unit tests check the svg's role and name and each chart's table. Playwright tests run in real apps that install the packed packages. They read the data tables the way a screen reader finds them and press the keys to move the tooltip.

If something doesn't work with your screen reader or keyboard, open an issue and say which reader and browser you use.

Read more​