w3c / at-driver

AT Driver defines a protocol for introspection and remote control of assistive technology software, using a bidirectional communication channel.
https://w3c.github.io/at-driver
Other
31 stars 4 forks source link

How to represent screen-reader specific modifier keys with `interaction.pressKeys` #34

Open zcorpan opened 1 year ago

zcorpan commented 1 year ago

From #26

Include a special modifier for the screen-reader specific modifier keys.

This is not done yet. How do we want to support this? Should there be a special string for each vendor in place of the raw key string, e.g. "nvda", "macOS VoiceOver", etc?

{
  "method": "interaction.pressKeys",
  "params": {
    "keys": ["nvda", "a"]
  }
}

Or a boolean property in InteractionPressKeysParameters to indicate that the screen reader specific modifier keys should be pressed?

{
  "method": "interaction.pressKeys",
  "params": {
    "keys": ["a"],
    "vendorModifier": true
  }
}

Originally posted by @zcorpan in https://github.com/w3c/aria-at-automation/issues/26#issuecomment-1286628283

jugglinmike commented 1 year ago

@jscholes This feature originates from our discussion on 2022-07-07, but I can't remember the motivating use case. Using "interaction.pressKeys" requires writing vendor-specific instructions, and an abstraction for a vendor's modifier key doesn't seem to change that. Could you say a bit about what this feature would enable?

zcorpan commented 1 year ago

I think an important aspect is that the special modifier key is configurable for some screen readers.

jugglinmike commented 1 year ago

Good point! That means the "meta" key would be contextual not just to the screen reader under test but also to its internal state.

To put this in terms of use cases: is this feature about letting folks control screen readers where the configuration is unknown?

jscholes commented 1 year ago

@jugglinmike Not sure I fully understand the ask/context here, but I'll give it a go.

With all of this context in mind, VoiceOver may already be well covered by any standard allowing a modifiers field to be included, if it includes Control and Option in its definition. But on Windows, this would not be the case, and hence some "special" handling seems required. Maybe we could just abstract the details away to a single screen reader/meta key (although "meta" has connotations), and behind the scenes, each implementation can respond appropriately?

jugglinmike commented 1 year ago

Thanks, @jscholes! It seems like the term "modifier" may have a couple meanings. Let me see if I've got this right:

Is that accurate?

jugglinmike commented 1 year ago

Today, the folks at the 2022-12-05 Community Group meeting discussed this.

First, we acknowledged that some system APIs support simulating the pressing of "system modifier" keys (e.g. Control and Shift) declaratively as a refinement to a sequence of additional keys to be pressed. For instance, they support instructions like: "press the X key, Y key, and Z key in that order, and ensure Control is depressed for the entirety of the sequence."

We were not convinced that such a convention is necessary for this proposal because the same sequence can be modeled with an unrefined series of keys-to-be-pressed, and that's already possible with the API which @zcorpan has drafted (see gh-26). The earlier example can be expressed in these terms: "press the Control key, X key, Y key, and Z key in that order."

We didn't come to any formal conclusions, but we do feel more confident about waiting for implementation experience before designing any API around system modifier keys.