Bug 191743

Summary: AX: Voiceover reads checkbox labels twice
Product: WebKit Reporter: Oliver Byford <oliver.byford>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs.webkit.org, cfleizach, n_wang, simon.fraser, thatguy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: Mac   
OS: macOS 10.14   
Attachments:
Description Flags
Reduced test case none

Description Oliver Byford 2018-11-16 04:32:47 PST
Created attachment 355041 [details]
Reduced test case

Given the following markup:

  <input id="checkbox-bar" name="foo" type="checkbox" value="bar">
  <label for="checkbox-bar">
    Foo
  </label>

  <br>

  <input id="checkbox-baz" name="foo" type="checkbox" value="baz">
  <label for="checkbox-baz">
    Bar
  </label>

Focus either checkbox.

This behaviour is also present in Safari Technology Preview release 70.

Expected behaviour:

Voiceover should announce the label once, e.g.

"Foo, unticked, checkbox"

Actual behaviour:

Voiceover announces the label twice, e.g.

"Foo, Foo, unticked, checkbox"
Comment 1 Radar WebKit Bug Importer 2018-11-16 04:33:33 PST
<rdar://problem/46124550>
Comment 2 chris fleizach 2018-11-17 23:03:21 PST
for some reason the <label> is being converted to a AXStaticText and it's reporting it has a child of its own (the actual static text item)
Comment 3 Oliver Byford 2020-12-22 07:37:33 PST
I can no longer reproduce this in Safari 14.0.2 (15610.3.7.1.10, 15610) on macOS 10.15.7 (19H114) – I think this has been fixed at some point.