Replies: 2 comments 7 replies
-
I guess I don't really have the context to comment, fully. For example: what exactly is axe-core? I think you are asking whether we should have a runs a tool CI as a test, or whether we should run the tool manually once and generate a report, but not check in any test machinery. Without knowing more, my offhand thought is that that a false dichotomy. I think we should have test machinery that we could run in CI, if we wanted to, regardless of whether we do. As I suggested in the PR, we would ideally have machinery that lets the report be generated similar to running other existing tests: pytest tests/accessibility
# or
node make test/accessibility or something along those lines. Then any one can easily produce a new report any time they want. Whether we actually run something in CI or not, is a separate question. |
Beta Was this translation helpful? Give feedback.
-
I suspect it'll be better to write down my findings also in this GitHub discussion, so it could be a central location for axe-core related discussions. I ran ~114 Bokeh data visualizations from the examples section of the documentation against axe-core, and I will thoroughly write down the issues that came up. Types of plots with accessibility issues axe-core can't find.Take for instance the following image URL scatter: All of the contents of that image scatter are wrapped in the Here are some more error-free visualizations in the documentation examples: There are several more, but they follow the general pattern of not having anything beyond the plot itself and the axes. Plots with Toolbars that trigger axe-core issuesGenerally, the problem with toolbars is the inclusion of the Bokeh logo as an anchor Look at the following picture from the colour scatter for a better illustration: The Bokeh logo has been highlighted. Axe-core was able to find this because the toolbar is in its own Places in the documentation where this issue was found: Colour scatter, Basic scatter, Lorenz, Linear c_map, cmap colorbar, transform markers, transform jitters, log plots, twin axes, stacked area, annotations legend, whisker annotations, annotations span, annotations slope, annotations box. There are several more of these issues, but there's no added benefit of including them here because they have the same source of error, and one fix would immediately reduce axe-core issues here to zero. Plots with external elements beyond a toolbar.These are the occurrences that I feel make a strong case for keeping axe-core in the test setup. Let's start with the data table plot: It's a plot that generates a table outside itself, and from the highlighted issue, we can see right away that axe-core detects contrast issues between the text and the background where the text falls in. And over here in the color sliders, we have an issue with sliders not having accessible names. It's also in the js_callbacks sliders Yet another case would be js_on_event with a color contrast issue with buttons For the multiselect widget, we have an issue with the select element not having an accessible name For multichoice, an unsupported ARIA attribute is used We also have a contrast issue with the dropdown button For the date picker, the form element isn't labeled. SummaryData visualizations that have some additional forms of interactivity can trigger different sorts of accessibility issues. The axe API found all the issues I have highlighted in this comment and axe-core works with that API. If we decide to keep it, then we can always have checks to make sure that these types of things are not allowed to be introduced into Bokeh. However, if Bokeh doesn't outrightly plan on supporting even more types of interactive components, these ones with issues can be fixed, tested again, and then axe-core can be removed. I really do hope this gives a bit more context to the poll. |
Beta Was this translation helpful? Give feedback.
-
This discussion references PR #14032
Some Useful Things to Note
<canvas>
element in HTML.<canvas>
element pretty much like a simple node, and has no idea how to perform any accessibility checks on it.On running all (~112 or so) visualizations in the bokeh docs gallery both via the axe Devtools extension in the browser and the axe-core library, I made some interesting findings:
canvas
, and can be checked for accessibility violations. This category of visualizations is where most of the violations occurred.Common Issues axe-core reported
[X] aria-label attribute does not exist or is empty.
[X] Contrast ration issues.
[X] Ensure links have discernible text.
[X] Form element does not have an implicit (wrapped) .
[X] Form element does not have an explicit .
[X] ARIA attribute is not allowed: aria-selected="true"
[X] Form element has explicit that is hidden"
The Next Step
The above issues come up somewhat frequently for plots with a toolbar and a widget, and there's a question of whether these are enough to justify leaving axe-core in the test setup. It's important to note that axe-core will be even more meaningful if future modifications of bokeh will see to more things being removed from the canvas element and rendered in other ways. This brings me to the question I wanted to ask:
1 vote ·
Beta Was this translation helpful? Give feedback.
All reactions