Install
Works with Drupal: ^10.3 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
Accessibility Infrastructure
We as the maintainers of Charts understand data to be content, and our goal is to make it easy to manage and present data to as many people as possible using Drupal as a medium. Accessibility is critical to achieving this goal, and accessibility was a big focus of this release, which introduces accessibility infrastructure for all charting libraries with a Charts submodule*. In 2017, @andileco posted an issue “plan” to increase accessibility, but the ticket had no traction, and @andileco eventually closed it due to lack of community response. However, the “Final Rule” deadline gave us a hard date to respond to, and our deeper experience and larger network made taking this on a less-daunting task. Here we are. With this release, we have raised the baseline for accessibility across the board, providing standard features to achieve WCAG 2.1 AA compliance even if the underlying JavaScript library lacks native support (which, sadly, is the case for most of them).
Let’s discuss the details. Every chart generated through the module now features:
- Semantic Structure: A
wrapper with proper role, tabindex, aria-label, and aria-describedby attributes.
- Accessible Summaries: A dedicated summary field (linked via aria-describedby) to provide screen readers with the chart's main takeaway. The admin UI now includes specific, formulaic guidance to help site builders write effective alt text and summaries.
- Automated Data Tables: A properly scoped, semantic HTML data table is now automatically generated from your chart's data. You can configure this table to be collapsible (with customizable button text and CSS classes), always visible, or visually hidden (screen-reader only).
- Captions: A visible figure caption displayed beneath the chart.
- Labels and Color Contrast: Allow for visual distinguishability [pre-existing feature].
Before this release, achieving this level of accessibility usually meant locking into specific libraries like Highcharts or writing significant custom template overrides. This update aligns with the Charts module's core philosophy of preventing vendor lock-in, giving you the freedom to choose your preferred library without sacrificing inclusivity.
Please note: While the module now provides the structural infrastructure, site builders and authors must still do the actual work of writing meaningful summaries and selecting contrasting colors. There are also additional features planned, including options for textures and symbols.
Universal Color Changer
We have refactored the "Color Changer" widget, which is exposed to users. Previously limited to Highcharts, this feature now relies on a generic base class and works out-of-the-box with all charting libraries packaged with the module (Billboard.js, C3.js, Chart.js, Google Charts, and Highcharts). Additional charting libraries will get this functionality not that this release is live.
Empty Chart Field Fix
For users leveraging the Chart field, we have improved the field's underlying validation. The module now properly checks the data collector table for actual input, meaning you no longer need to worry about an empty chart wrapper rendering on the front end when no data has been added to the field.
Highcharts: CDN Shift, Version Bump, and Pareto Lines
Highcharts users will benefit from a change to the default CDN. To address recent 429 Too Many Requests errors from code.highcharts.com, the module now defaults to using jsdelivr.net. We have also bumped the default Highcharts version to 12.5.0.
Additionally, Highcharts users can now easily enable and color a Pareto line directly from the UI (users of other libraries can still create this feature using Views combined with other contributed modules).
*Note: Supported libraries include Apache ECharts, Apexcharts.js, Billboard.js, C3.js, Chart.js, Google Charts, Highcharts, Kendo UI, and Plotly.js.
Contributors
andileco
cainaru
mutasim al-shoura
andrewozone
nikathone
vistree
maheshcv
pingwin4eg
chris burge
philsdev
rmorelli
stefan.kornChangelog