bpmn-io / dmn-js

View and edit DMN diagrams in the browser.
https://bpmn.io/toolkit/dmn-js/
Other
289 stars 137 forks source link

DMN elements - Scrollable region must have keyboard access #821

Closed vpellegrino closed 5 months ago

vpellegrino commented 7 months ago

Describe the Bug

The hit policy selector and the DMN table are affected by accessibility issue: Scrollable region must have keyboard access.

AXE recommendation: To solve this problem, you need to fix at least (1) of the following:

image

Steps to Reproduce

  1. Open the DMN editor (for example on the Web Modeler)
  2. Open the hit policy selector
  3. Resize the page so that the internal scrollbar appears on both elements (see screenshot)
  4. Execute the page scan, by using the "axe DevTools" extension

Expected Behavior

No accessibility issue is reported by the axe scan.

Environment

Please complete the following information:

nikku commented 7 months ago

Thanks for opening this issue. I guess we'll find some more issues related to a11y if we use axe extensively.

nikku commented 5 months ago

Confirmed this to be an actual issue, cf. recording:

capture 0N9ZMe_optimized


From the spec text: It's goal is to ensure that "Scrollable content can be reached with sequential focus navigation". Under "Assumptions" the spec writes:

This rule assumes that all scrollable elements with visible content need to be keyboard accessible. Scrollable elements that do not need to be keyboard accessible, perhaps because their content is purely decorative, the scroll area is whitespace, or because scroll can be controlled in some other keyboard accessible way such as through a button or custom scrollbar, may fail this rule but still satisfy success criterion 2.1.1 Keyboard.


What we violate:

barmac commented 5 months ago

The hit policy widget is a Select-only Combobox. There is already keyboard access to the options via arrow keys. We may want to annotate the control better though so that axe understands the its purpose.

nikku commented 5 months ago

@barmac The point is that nothing can be selected using keyboard right now (using tabbing). This is the bug we need to fix. Alternatively, yes, we can promote arrow keys.

barmac commented 5 months ago

Not on my machine?

https://github.com/bpmn-io/dmn-js/assets/28307541/0e3459e1-d98d-480f-9312-41e2b3fd5a9b

barmac commented 5 months ago

This was tested on https://demo.bpmn.io/dmn

We should NOT scroll to the select options via TAB.

barmac commented 5 months ago

The only issue I see right now from the keyboard perspective is that TAB out does not close the options.

nikku commented 5 months ago

My expected behavior:

barmac commented 5 months ago

🅱️ is what I'd expect

nikku commented 5 months ago

Verified arrow key (only) navigation on select elements.

@barmac What about turning it into a simple select? Why do we make it a custom component in the first place?

barmac commented 5 months ago

I am OK with plain HTML experience.

nikku commented 5 months ago

I'm de-prioritizing this item and adding to our a11y list.

barmac commented 5 months ago

Fixed via https://github.com/bpmn-io/dmn-js/pull/843

nikku commented 5 months ago

Fixed via https://github.com/bpmn-io/dmn-js/commit/6825860ca0e6cd8ff903323e6e3b8ca8687a8243.