Bug 253464 - AX: Consider simplifying AccessibilityObject::supportsPressAction, AccessibilityObject::actionElement, and AccessibilityObject::press
Summary: AX: Consider simplifying AccessibilityObject::supportsPressAction, Accessibil...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-06 14:10 PST by Tyler Wilcock
Modified: 2023-03-06 14:11 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Wilcock 2023-03-06 14:10:44 PST
Right now, AccessibilityObject::supportsPressAction and AccessibilityObject::actionElement do complicated and expensive traversals and heuristics to determine if we can expose otherwise inaccessible click handler elements. For example:

<span onclick="handleClick(this)" style="...styled to look like a button...">
  Open Shopping Cart (inaccessible because there is no role="button")
</span>

We should consider reworking all of these functions to instead expose (compute accessibilityIsIgnored = false) elements with click handlers that have only one accessible descendant, as this will be simpler than our current implementation.

Context: https://bugs.webkit.org/show_bug.cgi?id=253337#c9
Comment 1 Radar WebKit Bug Importer 2023-03-06 14:11:01 PST
<rdar://problem/106319562>