Bug 214003 - AX: Radio button input does not announce full label
Summary: AX: Radio button input does not announce full label
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Safari 13
Hardware: All macOS 10.15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-06 13:08 PDT by Jeff Miller
Modified: 2020-07-06 17:42 PDT (History)
2 users (show)

See Also:


Attachments
VO_RadioButton_AndMoreItems (91.35 KB, image/png)
2020-07-06 13:08 PDT, Jeff Miller
no flags Details
test case (376 bytes, text/html)
2020-07-06 14:54 PDT, James Craig
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Miller 2020-07-06 13:08:55 PDT
Created attachment 403611 [details]
VO_RadioButton_AndMoreItems

The label/for accessible name is not being announced in full by VoiceOver. This is occurring with multiple spans being used to create a styled label.

Example Code:

<input name=“selector” id=“selector_2" type=“radio”>
<label for=“selector_2">
  <span class=“column”>
    <span>256GB<sup>1</sup></span>
    <span>Caption ipsum dolor</span>
  </span>
</label>

.column {
  display:flex;
  flex-direction:column;
}

VoiceOver announces the accessible name as "256GB1 and one more item"

VoiceOver announces the entire label:
– Removing the <sup> element
– Removing display:flex
– Added aria-labelledby to the input
Comment 1 Radar WebKit Bug Importer 2020-07-06 13:09:15 PDT
<rdar://problem/65144885>
Comment 2 James Craig 2020-07-06 14:54:35 PDT
Created attachment 403624 [details]
test case
Comment 3 James Craig 2020-07-06 14:58:09 PDT
Related to bug 150176
Comment 4 James Craig 2020-07-06 15:08:48 PDT
WebKit Accessibility Inspector has the full label, but the Mac platform Accessibility Inspector shows no label exposed to the AX API.
Comment 5 James Craig 2020-07-06 15:17:09 PDT
If you change the flex-direction from column to row, VO reads the whole label, which is on one line now. It seems the reason this is getting a partial label is that WebKit is not exposing anything, so VO tries to repair/avoid the WebKit bug by speaking the nearest line of text as the label.
Comment 6 James Craig 2020-07-06 17:42:43 PDT
Disregard the last comment about `flex-direction: row;` I might've had a typo because I'm not able to verify those results anymore.