Skip to content
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

Support DMN diagram accessibility #778

Closed
ngohungphuc opened this issue Sep 20, 2023 · 8 comments · Fixed by #802
Closed

Support DMN diagram accessibility #778

ngohungphuc opened this issue Sep 20, 2023 · 8 comments · Fixed by #802
Labels
enhancement New feature or request needs more information Requires additional information to be actionable.

Comments

@ngohungphuc
Copy link

Is your feature request related to a problem? Please describe.

We are working on improving our accessibility by providing keyboard support that allowed user to be able to access the diagram using tab on the keyboard. Right now we don't see any kind of accessibility support for this library

Describe the solution you'd like

Support tab behaviour

Describe alternatives you've considered

This could be worth checking https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_WCAG/Keyboard

Additional context

None

@ngohungphuc ngohungphuc added the enhancement New feature or request label Sep 20, 2023
@barmac
Copy link
Member

barmac commented Sep 22, 2023

Hi,

thanks for opening this issue. Could you please point out the places where the library could be more accessible? How would you imagine keyboard navigation of a diagram modeling tool?

@barmac barmac added the needs more information Requires additional information to be actionable. label Sep 22, 2023
@nikku
Copy link
Member

nikku commented Sep 28, 2023

To add to @barmac comments: The editor is decently keyboard navigatable, allowing you to tab back and forth between cells.

capture Dak0uh_optimized

@ngohungphuc
Copy link
Author

Scherm­afbeelding 2023-10-16 om 11 54 14 @barmac Sorry for late reply. You can see on the demo they keyboard is not accessible you have to click on the blue icon to go to the detail view and then you can use accessible feature from there like @nikku mentioned.

@barmac
Copy link
Member

barmac commented Oct 16, 2023

Thanks for sharing. How would you expect to reach the desired element? I can imagine that we switch the selection via TAB, but what order should we follow? Or maybe there is another way?
How do I drill-down? My bet is via ENTER, but then we also need to think of a way to exit the decision.

@ngohungphuc
Copy link
Author

@barmac I hope that we can switch the selection via TAB.

@ngohungphuc
Copy link
Author

So any idea how we should tackle this issue ? @barmac

@barmac
Copy link
Member

barmac commented Oct 23, 2023

I can see two ways to approach it:

  1. Make elements focusable and use browser focus handling to switch elements. Change dmn-js selection when element is focused.
  2. Change dmn-js selection on TAB and Shift+TAB based on the order in elementRegistry.

If I were to tackle this topic, I'd probably try out one of the approaches, and also examine if it is accessible for keyboard-only users. Afterwards, I'd think about how to open and exit decision tables and literal expressions.

@BrianJVarley
Copy link
Contributor

BrianJVarley commented Nov 16, 2023

I can see two ways to approach it:

  1. Make elements focusable and use browser focus handling to switch elements. Change dmn-js selection when element is focused.
  2. Change dmn-js selection on TAB and Shift+TAB based on the order in elementRegistry.

If I were to tackle this topic, I'd probably try out one of the approaches, and also examine if it is accessible for keyboard-only users. Afterwards, I'd think about how to open and exit decision tables and literal expressions.

Hey @barmac, I work with @ngohungphuc and opened a pull request here --> #802 to add support for keyboard focus & enter key events on both DrillDown and ViewDrd buttons.

Could you review the changes suggested in the PR?

Like you've described in point 2 we would like TAB key to sequentially focus on each DrillDown button on the DMN Diagram and trigger drilldown on ENTER key pressed. Also vice versa while focused on the ViewDrd button and hitting ENTER key this will minimise the decision table similar to the existing click event. This keyboard accessibility is not there in the latest release dmn-js.

Here is a short demo of this fix using MacOS Voiceover Utility:

dmn-js-focus-drilldown-demo

barmac added a commit that referenced this issue Dec 7, 2023
Related to #778

---------

Co-authored-by: Maciej Barelkowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs more information Requires additional information to be actionable.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants