swimlane / ngx-charts

:bar_chart: Declarative Charting Framework for Angular
https://swimlane.github.io/ngx-charts/
MIT License
4.3k stars 1.15k forks source link

Add title and desc elements to svg - A11y #1702

Open nirkai opened 2 years ago

nirkai commented 2 years ago

There is no option to add title and desc elements for accessibility purpose.

The svg element required alternative text (like images), which should be implemented with title (and optional desc) element. The default charts using svg and so it missing this important elements.

Here are some references: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title https://www.deque.com/blog/creating-accessible-svgs/ https://css-tricks.com/accessible-svgs/

BillLaNTT commented 2 years ago

I'm needing this too to pass an accessibility compliance work. to make the graphics accessible we also need the SVG to have role="img" to tell assistive technologies that the element is not purely presentational that it is informational and is desctibed in aria-image="chart"