Bug 246426 - AX: List size is still announced by VoiceOver despite use of aria-setsize=-1
Summary: AX: List size is still announced by VoiceOver despite use of aria-setsize=-1
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Safari 16
Hardware: Mac (Intel) macOS 12
: P2 Normal
Assignee: Andres Gonzalez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-12 15:14 PDT by Todd Kloots
Modified: 2023-11-30 16:31 PST (History)
11 users (show)

See Also:


Attachments
Video demo of the issue (20.92 MB, video/quicktime)
2022-10-12 15:14 PDT, Todd Kloots
no flags Details
Patch (9.16 KB, patch)
2022-11-16 08:38 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (9.15 KB, patch)
2022-11-17 07:01 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (8.90 KB, patch)
2022-11-18 14:18 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Todd Kloots 2022-10-12 15:14:40 PDT
Created attachment 462949 [details]
Video demo of the issue

What steps will reproduce the problem?
(1) Start VoiceOver
(2) Open https://codepen.io/toddlr/pen/abGXbzN
(3) Use tab to move focus to the first item in the list

What is the expected result?

VoiceOver should not announce the size of the list

What happens instead?

VoiceOver announces the size of the list on initial focus ("List with three items").
Comment 1 Radar WebKit Bug Importer 2022-10-12 15:15:02 PDT
<rdar://problem/101099199>
Comment 2 Todd Kloots 2022-10-12 15:24:06 PDT
For more context: all lists in Slack are virtualized. And so, with only the items scrolled into view actually rendered into the DOM VoiceOver reports the list size according to what is rendered into the DOM/scrolled into view. Therefore in 99.99% of cases in Slack the list size announced by VoiceOver will be inaccurate (“list of 5 items” when in fact it is a channel with loads and loads of messages) and could be confusing for users.

The ARIA spec indicates use of set-size="-1" when the size of the list is unknown. We've implemented this for all our virtualized lists in Slack, and yet VoiceOver is still announcing the list size.
Comment 3 Sommer Panage 2022-11-15 18:54:57 PST
Confirming this still reproduces on 13.1 Beta (22C5044e)
Comment 4 Andres Gonzalez 2022-11-16 08:38:30 PST
Created attachment 463557 [details]
Patch
Comment 5 Andres Gonzalez 2022-11-16 08:40:35 PST
This is the WebKit portion of the fix, a VO change is also necessary.
Comment 6 Andres Gonzalez 2022-11-17 07:01:25 PST
Created attachment 463580 [details]
Patch

Now works for ATSPI as well.
Comment 7 Andres Gonzalez 2022-11-18 14:18:48 PST
Created attachment 463612 [details]
Patch
Comment 8 EWS 2022-11-18 16:19:26 PST
Committed 256861@main (ca1977fd4ef6): <https://commits.webkit.org/256861@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 463612 [details].
Comment 9 Todd Kloots 2023-11-30 16:31:38 PST
Verified fixed. Tested using Mac OS 14.1.1 in both Chrome (Version 119.0.6045.199) and Safari (Version 17.1 (19616.2.9.11.7).