Accessibility of Java applications
Hi team, I noticed that apps running on CheerpJ are not accessible to people with disabilities. This is unfortunate since UIs built with Swing offer decent support for accessibility out of the box. As an open-source contributor to the AccessKit project, I'd like to discuss with you a way to solve this issue, which would help Leaning Tech reach governments and big companies that have accessibility of their software as a hard requirement. I sent a message with more details to your main email address and was instructed to also post here when I called today. Thank you in advance for contacting me back!
5 Replies
You are correct, we have not implemented accessibility interfaces so far. I agree with you that we should support it, but I suspect it will be difficult to schedule this before the final 3.0 release. In particular, I think that to expose accessibility data to the browser we will need to generate more fine-grained DOM elements corresponding to Swing elements, while currently everything is simply drawn using an HTML5 canvas.
Hello @ap87no , indeed! That's exactly where AccessKit can come into the picture. The projects we helped so far are also directly drawing into native windows, AccessKit is the accessibility layer that takes care of calling the right APIs depending on the platform. We already have JVM bindings to our Rust core data structures and we have started prototyping a WebAssembly backend. Implementing this kind of stuff is not easy, that is why I think it could be interesting to collaborate on this.
To be honest, my gut feeling is that this might be overcomplicated. We have historically always avoiding introducing additional layers and directly used DOM APIs.
This is just a gut feeling, since we have no experience on how much effort it would take to directly map AWT accessibility primitives (which should be the Java ground truth) to native DOM ARIA mappings.
Before deciding to use a 3rd party library we would certainly first need to scope the complexity of using native APIs directly
Mapping AWT types to DOM elements with appropriate ARIA attributes is indeed the way to go. Integrating AccessKit would of course introduce a small layer of indirection, but it's honestly not that much. Currently only major GUI toolkits backed by big companies have proper accessibility support. Our goal is to share efforts as much as possible, amongst OSes and toolkits because, as you've admitted, most companies don't have accessibility experts on their team.
Closing this, the feature is tracked in an existing issue on GitHub: https://github.com/leaningtech/cheerpj-meta/issues/152
GitHub
assistive technologies · Issue #152 · leaningtech/cheerpj-meta
There is no documentation that I can find (or is it not visible to assistive technologies?) how accessibility with external tools is implemented? Specifically, how does a screen reader or other too...