Created attachment 408757 [details] Screen recording illustrating the bug in Safari What steps will reproduce the problem? 1. Start VoiceOver 2. Go to https://codepen.io/toddlr/pen/VwadgRE 3. Press tab to move focus to the button labeled "Show menu" 4. Press enter to display the popup menu What is the expected result? When the menu is displayed, VoiceOver announces the number of actual menuitems (e.g. the the number of elements with the role of "menuitem." In the case of this example: 5) What happens instead of that? When the menu is displayed, VoiceOver announces the number of menuitems per the number of elements with text nodes and/or the role of separator. This count is misleading and doesn't represent the same count provided by VoiceOver for Mac OS menus.
<rdar://problem/68884512>
Created attachment 408758 [details] Screen recording illustrating how the count of menuitems is correct for Mac OS menus This screen recording illustrates how VoiceOver correctly announces the number of menuitems in a menu for native menus on MacOS - the separators are not included in the count.
The cause of this issue is outside of WebKit, so resolving as MOVED. The relevant team is working on the issue under rdar://68884512.
Created attachment 468829 [details] Video illustrating the bug in Mac OS Sonoma 14.1.1 This bug remains in Sonoma. Tested using 14.1.1 (23B81). As you can hear VoiceOver incorrectly reports the number of menuitems in the menu when testing in Safari/Webkit. (See attached video.)