Skip to content

Commit

Permalink
add a11y info
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Medrano authored and Xavier Medrano committed Mar 24, 2023
1 parent 6b266be commit 3972ef9
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion charting/highcharts/highcharts.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,22 @@ title: {
credits: {
enabled: false
}
```
```

### Accessibility

Highcharts has an accessibility module that introduces the feature to navigate through your charts with the keyboard, as well as give context about your chart to screen readers.

[Their accessibility docs](https://www.highcharts.com/docs/accessibility/accessibility-module) describe how to include it with a script. If you're using a react component however, you'll have to import the module into that instead, and then initialize it
```
import React from "react"
import { createRoot } from "react-dom/client"
import Highcharts from "highcharts"
import highchartsAccessibility from "highcharts/modules/accessibility" # Importing
import HighchartsReact from "highcharts-react-official"
highchartsAccessibility(Highcharts) # Initializing
function SampleChart({ props }) {
...
```

0 comments on commit 3972ef9

Please sign in to comment.