Bug 218309 - AX: aria-selected state not announced for ARIA treeitem instances
Summary: AX: aria-selected state not announced for ARIA treeitem instances
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Safari 14
Hardware: Mac macOS 10.15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-28 15:44 PDT by Todd Kloots
Modified: 2023-11-30 15:42 PST (History)
3 users (show)

See Also:


Attachments
Screen recording navigating an ARIA tree using VoiceOver with Safari (1.76 MB, video/quicktime)
2020-10-28 15:44 PDT, Todd Kloots
no flags Details
Screen shot of the ARIA tree example with the Accessibility Inspector (894.90 KB, image/png)
2020-10-28 16:06 PDT, Todd Kloots
no flags Details
Select state not updating (25.99 MB, video/quicktime)
2022-11-15 17:21 PST, Sommer Panage
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Todd Kloots 2020-10-28 15:44:18 PDT
Created attachment 412578 [details]
Screen recording navigating an ARIA tree using VoiceOver with Safari

Steps to reproduce:

1. Start VoiceOver
2. Go to https://codepen.io/toddlr/pen/XWrGrGV
3. Move focus to the ARIA tree example
4. Notice VoiceOver does not announce the aria-selected state for the selected ARIA treeitem


What is the expected result?
VoiceOver should announce the aria-selected state for the ARIA treeitem

What happens instead of that?
VoiceOver does not announce the aria-selected state for the ARIA treeitem
Comment 1 Radar WebKit Bug Importer 2020-10-28 15:44:33 PDT
<rdar://problem/70783545>
Comment 2 Todd Kloots 2020-10-28 16:06:57 PDT
Created attachment 412584 [details]
Screen shot of the ARIA tree example with the Accessibility Inspector

I believe this could be a bug in VoiceOver. When examining the selected ARIA treeitem instance in the Accessibility Inspector, the inspector shows it as selected.
Comment 3 Todd Kloots 2021-07-28 10:26:27 PDT
As of Mac OS 11.4 aria-selected is announced by VoiceOver BUT only if interacting using VO- navigation. If you navigate using only arrow keys WITH VO- modifiers aria-selected is not announced.
Comment 4 Brent Fulgham 2022-02-10 19:31:40 PST
The fix for this issue was needed outside the WebKit project, therefore this is being resolved as 'Moved'.

This should now be fixed in shipping software.
Comment 5 Sommer Panage 2022-11-15 15:58:10 PST
Seeing different but problematic behavior in 13.1 Beta (22C5044e), see attached video. When cell selection changes, VO continues to announce the previously selected cell as selected. This is a regression from the progress made in Monterey (12.6.1).
Comment 6 Sommer Panage 2022-11-15 17:21:43 PST
Created attachment 463547 [details]
Select state not updating
Comment 7 Todd Kloots 2023-11-30 15:42:13 PST
Verified this as fixed. The root cause was the repro example (https://codepen.io/toddlr/pen/XWrGrGV) didn't implement aria-selected per the spec (https://www.w3.org/TR/wai-aria-1.2/#aria-selected). 

Specifically, per the spec: "Single-selection containers where the currently focused item is not selected. The selection normally follows the focus, and is managed by the user agent."

So, if an ARIA tree uses aria-selected in a single-selection mode it needs to explicitly declare all unselected treeitems using aria-selected=false else VoiceOver will (per the spec) assume focus and selection are in sync.