Bug 216836

Summary: AX: VoiceOver does not dispatch pointerdown/pointerup on buttons, only mousedown/mouseup/click
Product: WebKit Reporter: Tim Guan-tin Chien [:timdream] <timdream>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: timdream, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: All   
OS: All   
Attachments:
Description Flags
test case
none
voiceover-test-window.html none

Description Tim Guan-tin Chien [:timdream] 2020-09-22 11:04:19 PDT
Created attachment 409380 [details]
test case

STR:

1. Load the test case, a 

`<div
    id="test1"
    role=button
    tabindex="0"
>I am a role=button</div>`

with pointerdown/pointerup/mousedown/mouseup/click event listeners installed

2. Open up the DevTools console
3. Focus on the div and VO+space
4. Inspect the console output

Expected:

1. I should see

[Log] test1 pointerdown (voiceover-test.html, line 23)
[Log] test1 mousedown (voiceover-test.html, line 21)
[Log] test1 pointerup (voiceover-test.html, line 24)
[Log] test1 mouseup (voiceover-test.html, line 22)
[Log] test1 click (voiceover-test.html, line 25)

Just like what I will see when I click on the div with a mouse cursor

Actual:

I am seeing

[Log] test1 mousedown (voiceover-test.html, line 21)
[Log] test1 mouseup (voiceover-test.html, line 22)
[Log] test1 click (voiceover-test.html, line 25)

where pointer events are missing.
Comment 1 Radar WebKit Bug Importer 2020-09-22 11:44:22 PDT
<rdar://problem/69383188>
Comment 2 Tim Guan-tin Chien [:timdream] 2020-11-09 10:00:33 PST
Created attachment 413598 [details]
voiceover-test-window.html

Further test shows that VO does dispatch pointer events only under this condition:

- When the pointer event listeners are attached to window.
- When there isn't any mouse event listeners attached.
- When VO key is applied on a `aria-label` not a `role=button`.

This is very inconsistent and confusing...