elastic / elastic-charts

https://elastic.github.io/elastic-charts/storybook
Other
372 stars 120 forks source link

Accessibility WCAG Level A #621

Open markov00 opened 4 years ago

markov00 commented 4 years ago

This ticket list the tasks required to meet the Level A of the WCAG accessibility guide lines:

Build a first version of the alternative text that describe how the chart is composed alone those lines:

The chart is titled NNN, is an histogram chart with 3 different stacked series: series A, series B and series C.
The chart has an X axis interval from May 10th to May 25th 2020.
The chart has a Y axis interval from 0 to 100.
The series A has 10 different values, from a min of 4 to a max of 10, average of 6.
The series B has 10 different values, from a min of 10 to a max of 40, average of 20.
The series C has 10 different values, from a min of 2 to a max of 30, average of 10.

If during a preparatory investigation we found that this approach is too complex and lead us to an higher complexity we should pivot the decision toward a basic table rendering of the chart.

N/A

The legend should use semantic markup to describe its structure. https://github.com/elastic/elastic-charts/issues/613

N/A we are not conveying content using colors https://github.com/elastic/elastic-charts/issues/589

The legend should be accessible from the keyboard. The chart itself will not be make accessible with the keyboard due to the technical difficulties and efforts to make an image like that accessible from the keyboard. On a second stage (TODO add step 2 ticket) some efforts will go in that direction.

N/A

There isn't flashing mechanism in the chart renderer, although moving your mouse over the legend or the chart cause the chart elements to fade in/out depending on the hovered elements. This can cause quick flesh if you are moving your mouse too quickly but we should investigate if this is considered as a failure or not

This should be tackled together with G2.1 on the legend. https://github.com/elastic/elastic-charts/issues/613

NA, the language of the page is already configured by Kibana or shall be configured by the chart consumer

We display some errors, specially when hiding all the series or when there is no data input. We should fix the possible guideline failures on in these cases.

Check markup compatibility to meet the criteria

markov00 commented 4 years ago

@rshen91 @myasonik I've did a quick check on the WCAG 2.1 and I've written here the what is missing or to be checked on our chart library to meet the Level A. Can you please check that? Do you think it should be extended with each criterion?

rshen91 commented 4 years ago

@markov00 I think this looks great - thank you for compiling this! I didn't find any discrepancies between WCAG 2.0 and what you've outlined. I personally don't think that each criterion needs to be extended (here at least). I think if more description and drilling down is needed, maybe in the legend navigation and alternative text issues we could add the more specific criterion if it's needed? Anyways, I think for the purpose of this issue, extending the criterion might make it noisier without much gain.

myasonik commented 4 years ago

Guideline 2.3 – Seizures and Physical Reactions Do not design content in a way that is known to cause seizures or physical reactions. There isn't flashing mechanism in the chart renderer, although moving your mouse over the legend or the chart cause the chart elements to fade in/out depending on the hovered elements. This can cause quick flesh if you are moving your mouse too quickly but we should investigate if this is considered as a failure or not

I haven't seen any audits that would mark this as a failure so from a compliance perspective I think it's ok.

From a Kibana perspective, the one thing that I would make sure charts support in this regard is Kibana's accessibility:disableAnimations advanced setting.

From a broader perspective, it would also be good to respect prefers-reduced-motion though there's no plan in Kibana or EUI currently to support it (though they should as well). Might be good to make a plan together on this.