website/tutorials/a11y/conclusion.mdx
This tutorial demonstrated a wide array of accessibility improvements that can be introduced to line charts, making them usable for a broader spectrum of users. The considerations and methods presented illustrate the importance of creating inclusive web applications.
Among the discussed topics were:
The example provided has even more improvements not directly discussed during the the tutorial. One such enhancement is an informative tooltip that lists available commands, adding another helpful layer of user instruction.
:::tip
The complete example code provides further insights, and reviewing it is recommended for a comprehensive understanding of the accessibility improvements discussed in this tutorial.
:::
:::info Ready-made plugin
If you would rather not wire these techniques up by hand, the Accessibility plugin in the plugin examples packages the keyboard navigation and ARIA layer described here into a chart-level helper built on pane primitives:
addAccessibilityPlugin(chart, { chartTitle: 'My chart' });
Keyboard navigation always covers the whole series (the arrow keys page the
chart as needed). The plugin defaults to dataScope: 'visible', which scopes the
spoken summaries to the current viewport – the recommended mode for charts with
large data sets. Use dataScope: 'all' when you want those summaries to describe
the full history.
It is also fully translatable: numbers and dates follow the chart's
localization.locale, and every announced string can be overridden through a
messages bundle (with a lang attribute so screen readers use the right
voice). See the plugin's README and its Spanish example.
:::
This tutorial aimed to foster a better understanding of these practices, promoting an inclusive web where applications are made with everyone in mind. Thank you for following along and continue putting accessibility at the forefront of your web development endeavors.
You can view the example in a new window, or download the source file below:
<ul> <li> <a href={require('!!file-loader!./assets/a11y-chart.html').default} target="\_blank" > View in a new window </a> </li> <li> <a href={require('!!file-loader!./assets/a11y-chart.html').default} download="a11y-chart.html" target="\_blank" > Download the file </a> </li> </ul>