-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessibility: Make charts screen-reader-accessible #11842
Comments
Making the charts screen-reader accessible might be one of the hardest tasks, and there might be more complex solutions to find in a long term. Having the data as a plain table, might be a start, but a table is still quite hard to navigate with a screen-reader without losing context ever so often. Some ideas for more complex, but maybe more accessible solutions, that we could think about in the long run: Interactive keyboard navigation If coming over a chart, you have the possibility to enter it's interactive mode. In this, you can use arrow keys to navigate. Some examples for different chart types: Pie chart You just use up/down to get a list from the largest slice to the smallest slice and you get automatically read the value and percentage, example screen-reader reaction:
Similar interactive modes could be build for 2 dimensional charts, like a bar chart, where left/right moves the cursor on the x-axis and you get a readout of the x position and the y value, and pressing up/down may jump between different lines. Auditive support Even with a complex, satisfying interactive keyboard mode, some charts are hard to get a feeling for the overall picture (is the line rising or dropping). Never seen something like that and now sure whether or not that might be really helpful, but auditive support might give that. Imagine, that while navigating on the x-axis as described above, won't read you out immediately the value, but you get a sound, for the value, which pitches changes with the y value. That way you can hold right and get a good feeling immediately how the data develops over time, without seeing it. And if you need the concrete values, just pause at a specific position or press a specific key to read out the value. For that kind of implementations the Accessible Object Model might become handy. Until now we can utilize ARIA live regions for that. I know that these options are not a short term goal and easy to develop, but we might already think about that kind of long term goal what we actually want to do with the charts, and how these will look in our utopian perfect accessible Kibana :-) |
I moved this to phase 2, since this will require some more thoughts and discussion. Phase 1 now only holds showing a warning: #13572 |
Just to leave this ticket with a more firm plan, for now, I think it's important to focus on simple solutions we can execute on today. So, where you started with - having a plain table backing all visualizations - I think is a great plan. Once we have a base line experience in place, we can spend more time iterating on possible solutions to improve that base line but something is better than nothing. Related: #22142 |
Pinging @elastic/datavis (Team:DataVis) |
Pinging @elastic/datavis (Feature:ElasticCharts) |
Alt text
The chart or visualization should have alternative text that conveys the type of visualization and some information (e.g., "Bar chart showing @timestamp per hour"). One way to present this information is with aria-label, which you are already using throughout the site to provide information to screen readers.
Spy
The spy allows the user to view data that was used to generate the report, which is good, but the tables it presents has some accessibility issues, including the following:
Tabular version of visualization data
Every visualization and chart needs a tabular version of this data. This can be either accessible via the UI or hidden off-screen so that only screen readers can access it.
Hide axes
Text that is part of the chart (e.g., x and y axis) that is not useful for a screen reader user should be hidden. One way to do this is with
aria-hidden="true"
. Note that if an element can receive keyboard focus, it should never havearia-hidden="true"
. The links will still receive keyboard focus, but the link text will not be read.Relevant ARIA spec: 1.1.1 Non-text Content - Level A
The text was updated successfully, but these errors were encountered: