Bug 133608

Summary: AX: VoiceOver should not announce clickable on all elements inside an element with a click handler
Product: WebKit Reporter: Dylan Barrell <dylan>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: jcraig, webkit-bug-importer
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.9   
URL: http://jsfiddle.net/b2KDZ/1/

Description Dylan Barrell 2014-06-07 12:12:04 PDT
See the following JSFiddle

http://jsfiddle.net/b2KDZ/1/

The example 2 should not announce clickable on the heading and the paragraph.

The solution would be to suppress this behavior when the region contains naturally focusable elements and elements with appropriate ARIA roles and attributes.

so this:

<div>
<h2>Heading</h2>
<p>Text</p>
<span class='fakebutton'>press</span>
</div>

Would announce clickable on everything, whereas these examples would not:

<div>
<h2>Heading</h2>
<p>Text</p>
<span class='fakebutton' role="button" tabindex="0">press</span>
</div>

<div>
<h2>Heading</h2>
<p>Text</p>
<button>press</button>
</div>
Comment 1 James Craig 2014-06-07 15:41:19 PDT
This report isn't actionable. Your examples aren't programmatically distinguishable from the anti-pattern. You're saying the span in this example shouldn't be announced as "clickable" even though this is a common problematic case:

<div onclick="return delegate(event);">
  <h2>Heading <span>x</span></h2>
  <p>Text</p>
  <button>press</button>
</div>

Our first responsibility is to our users, and the slight increase in verbosity (e.g. "clickable") when there is some ambiguous code results in a much better experience than the change you're asking for, which would make many real clickable elements undiscoverable and/or imperceivable.
Comment 2 James Craig 2014-06-07 16:06:37 PDT
Duping out to bug 133613: AX: Heuristic: Avoid exposing an element as clickable if mouse event delegation is handled on an element with any explicit ARIA role, including presentation.
Comment 3 James Craig 2014-06-07 16:07:04 PDT

*** This bug has been marked as a duplicate of bug 133613 ***