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

Clarification of purpose of synthesized keyboard events #183

Open
jaragunde opened this issue Oct 11, 2021 · 0 comments
Open

Clarification of purpose of synthesized keyboard events #183

jaragunde opened this issue Oct 11, 2021 · 0 comments

Comments

@jaragunde
Copy link

Regarding: https://github.com/WICG/aom/blob/gh-pages/explainer.md#user-action-events-from-assistive-technology

I've been working on the implementation of synthesized keyboard events for AT events in Chromium, building up from an existing proof of concept for increment/decrement: https://crrev.com/c/2264176

The first times I went through the document, it was a bit hard for me to understand the problem that these events were trying to solve, and the way to test our implementation.

I can find two main purposes for these synthetic events. On the one hand, this is explicitly mentioned:

To preserve the privacy of assistive technology users, events from assistive technology will typically cause a synthesised DOM event to be triggered.

It's not explained how this could be a privacy issue, but I understand it's because websites can detect AT actions finding out if there is an associated mouse or keyboard event. I've written an example of that applied on a native slider, which can be used as a test for the first purpose. Find it here.

The other purpose is a bit hidden in the text, under "Use case 3" section, where it explains the problem. It is implied that synthesized keyboard events are a solution for this although not explicit in the text:

However, there is no way for web authors to listen to accessible actions on custom elements. For example, the custom slider above with a role of slider prompts a suggestion on VoiceOver for iOS to perform swipe gestures to increment or decrement, but there is no way to handle that semantic event via any web API.

I've tested the Chromium proof-of-concept against this example of custom slider, and verified it fixes the problem.

Maybe the different purposes of these feature could be made more visible, or introduced at the same level in the text? Additionally, examples are always useful for testing, understanding, etc. I hope the ones mentioned here can be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant