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").
<rdar://problem/101099199>
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.
Confirming this still reproduces on 13.1 Beta (22C5044e)
Created attachment 463557 [details] Patch
This is the WebKit portion of the fix, a VO change is also necessary.
Created attachment 463580 [details] Patch Now works for ATSPI as well.
Created attachment 463612 [details] Patch
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].
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).