Bug 220675

Summary: AX: AT-synthesized key events for common user actions (increment/decrement) are detectably different in many ways, potentially causing both web app breakage and AT identification
Product: WebKit Reporter: James Craig <jcraig>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, avinashkthapa, cdumez, cfleizach, dmazzoni, esprehn+autocc, ews-watchlist, jdiggs, kangil.han, samuel_white, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
ews-feeder: commit-queue-
patch
ews-feeder: commit-queue-
patch
none
patch none

Description James Craig 2021-01-15 14:42:37 PST
Follow-on from bug 220626.

AT-synthesized key events for common user actions (increment/decrement) are detectably different in many ways, potentially causing both web app breakage and AT identification

https://github.com/WICG/aom/blob/gh-pages/explainer.md#deprecated-keyboardevent-object-properties-optional

The synthetic events should include all the other key event properties listed in that table for two reasons.

1. Someone else is going to write an example that works with the keyboard but doesn't work with VO because it uses another one of the legacy properties. `event.which` for example. It's 0 with this patch, but should be 40 for ArrowDown... keyIdentifier also uses a different case between the AT and non-AT path: "up" vs "Up"

2. Any difference in the Event object might be used nefariously to differentiate an AT user from a keyboard user. For example: event.code, event.keyLocation and event.metaKey are also different between the AT and non-AT paths, but should not be. There may be more.
Comment 1 Radar WebKit Bug Importer 2021-01-15 14:42:45 PST
<rdar://problem/73263977>
Comment 2 chris fleizach 2021-01-19 15:57:59 PST
Created attachment 417921 [details]
patch
Comment 3 chris fleizach 2021-01-20 12:13:29 PST
Created attachment 417987 [details]
patch
Comment 4 chris fleizach 2021-01-21 09:26:16 PST
Created attachment 418049 [details]
patch
Comment 5 James Craig 2021-01-21 10:38:48 PST
Comment on attachment 418049 [details]
patch

lgtm. thanks.
Comment 6 chris fleizach 2021-01-21 10:44:56 PST
Created attachment 418063 [details]
patch
Comment 7 EWS 2021-01-22 13:55:40 PST
Committed r271760: <https://trac.webkit.org/changeset/271760>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 418063 [details].