Support "click-ancestor" action on descendants of click handler, instead of "click"
Categories
(Core :: Disability Access APIs, enhancement, P3)
Tracking
()
People
(Reporter: aaronlev, Assigned: Jamie)
References
Details
(Keywords: papercut)
Attachments
(2 files)
In order to help screen readers avoid too many "clickable" verbalizations, change the name of "click" to "ancestor-click" when the action is inherited via a click handler on an ancestor. For the root clickable item, keep "click". Note: it must always be action #0 (the default one). For reference, here is the CL for Chromium: https://chromium-review.googlesource.com/c/chromium/src/+/602261 And the bug/issue: https://bugs.chromium.org/p/chromium/issues/detail?id=689201
Assignee | ||
Comment 1•7 years ago
|
||
As far as I know, Firefox doesn't expose click actions on descendants. For example, if you do this: data:text/html,<div role="group" aria-label="a" onClick=";"><div role="group" aria-label="b">foo</div></div> The "a" group gets a click action, but the "b" group does not. (In contrast, in Chrome, it does.) This is why we don't have as many "clickable clickable"s in Firefox as we (currently) do in Chrome. So, I don't think this specific change (changing the name for descendants) is relevant for Firefox. One could argue that perhaps Firefox *should* expose actions for descendants, in which case it should be "click-ancestor" (not "click").
Updated•7 years ago
|
Comment 2•7 years ago
|
||
afaik we expose 'click' actions on text and image descendants of clickable or linkable accessibles, not in general case though. (In reply to Aaron Leventhal from comment #0) > In order to help screen readers avoid too many "clickable" verbalizations, > change the name of "click" to "ancestor-click" when the action is inherited > via a click handler on an ancestor. For the root clickable item, keep > "click". It is not a backward compatible change, so those screen readers who rely on that action probably won't find it or process it properly. So my question would be do we really need to expose any actions on descendants? Especially since Firefox's set of actionalbe elements is lesser than Chrome's one and it seems it doesn't affect badly on Firefox accessibility.
Assignee | ||
Comment 3•2 years ago
|
||
Exposing a click ancestor action on descendants of click listeners would mean NVDA relies on simulating mouse clicks less often, which would probably solve a bunch of bugs such as activating the Edit Bug button on Bugzilla (bug 1675469), intermittent failure when activating the Show Options button on GitHub comments and occasional other failures trying to activate controls with NVDA across the board.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
Previously, we supported an action on text leaf and image accessibles if an ancestor was a link or was clickable.
However, we didn't support it on any other kind of descendant, nor could clients differentiate between a click handler on the descendant itself vs an action propagated because of an ancestor.
In addition, the click was performed on the ancestor element itself, rather than bubbling up to the ancestor.
This was probably never a real problem given the limited scope, but it meant that the actual event target was lost.
This has been replaced by a "click ancestor" action supported on all descendants of ancestors providing an action.
The click is dispatched to the descendant and bubbles up to the ancestor.
Aside from consistency and the ability to differentiate the action, this allows clients to stop relying on simulating clicks themselves to directly target a descendant.
This avoids problems caused by obscured web elements, obscured browser windows and other weird screen coordinate issues.
It thus fixes several problems reported by NVDA screen reader users.
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 5•2 years ago
|
||
Normally, we treat the body as the DOM node for a DocAccessible.
However, a click listener can be added to the root element; e.g. the html element.
We now treat a click listener added to the root element the same as if one were added to the body.
This required a change to nsAccessibilityService to use the DocAccessible when click listeners change for the root element so a cache update is pushed.
This change was made for the body also, since we weren't pushing a cache update for click listener changes on the body either.
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f662752abd85 part 1: Support "click ancestor" action on descendants when an ancestor has an action. r=eeejay https://hg.mozilla.org/integration/autoland/rev/f96f2a799305 part 2: Support click handlers added to the root element. r=eeejay
Comment 7•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f662752abd85
https://hg.mozilla.org/mozilla-central/rev/f96f2a799305
Assignee | ||
Comment 8•2 years ago
|
||
:ryanvm, as per our discussion on Slack and bug 1768219 comment 4, can you please back out these patches on beta (but leave them on nightly)? Thanks.
Assignee | ||
Comment 9•2 years ago
|
||
I've just landed a patch in bug 1768219 which should fix the Talos regression. However, we'll need to wait a bit to know whether it really fixes it. Given where we're at in the beta cycle, it's probably still worth backing this out of beta, unfortunate as that is for users who could benefit from this fix.
Comment 10•2 years ago
|
||
backout |
Backed out for 101.0b8.
https://hg.mozilla.org/releases/mozilla-beta/rev/f128e4502cf9
Description
•