christolliday / limn

Experimental cross platform GUI library
Other
404 stars 19 forks source link

Accessibility #35

Open Diggsey opened 6 years ago

Diggsey commented 6 years ago

It's probably way too early to actually take any action here, but one of the common criticisms with applications that do custom UI rendering is that they typically have terrible accessibility, and do not follow the standards for how a GUI should behave.

I think it would be good to at least set a goal of having accessibility on-par with applications written to use the platform-native controls.

In the long run, this might mean integrating with the windows automation API and similar on other platforms.

In the short term, it means taking settings from the OS (double click speed, key repeat delay, etc.) implementing keyboard navigation and mouse event capturing to mirror "normal" UI behaviour.

I'm really excited by this project! It seems like a great combination (webrender/cassowary/rust) and rust really needs good and easy to use GUI libraries.

christolliday commented 6 years ago

Thanks for making this issue, it's definitely good to start thinking about, even if it probably won't be supported for a while.

The biggest accessibility feature by far is supporting an "Accessibility tree" or "UI automation tree", ie. exposing a simplified representation of the widget tree with extra semantic information that external applications (screen readers, voice input etc.) can talk to as clients, with the application acting as a server. A nice side effect of this is you can use it to make UIs scriptable.

I think it would be good to at least set a goal of having accessibility on-par with applications written to use the platform-native controls.

Agreed, although if it's at all possible I'd prefer to go about it by targeting the lowest common denominator of platform-native APIs and if any platforms are missing features, re-implement them in a platform independent way. Or at least, if that turns out to be impractical, starting with a basic foundation on all platforms before adding extra features to individual platforms.

Unfortunately it looks like there's no single clear cross platform standard for how external accessibility apps communicate with applications, but there might be usable cross platform libraries that abstract over the different standards. I looked at what servo has planned and it's stalled right now, but hopefully they'll have something that can be used as a dependency at some point. Could be worth looking into Atk as well.

This could be a good resource on how the accessibility parameters and mapping of trees could be done although it's incomplete: Accessibility Object Model.

Anyway I probably won't get around to any of this until I'm more comfortable with the core of limn but I'll try to keep it in mind, in the mean time, any info or PRs welcome :)