[menu] iPhone VoiceOver closes entire menu after last submenu item
Bug report
Current behavior
On iPhone Safari with VoiceOver, the virtual cursor moves through an open submenu's items correctly. After reaching the final submenu item, swiping forward once more closes the entire menu, including the parent menu. This prevents continuing to the items after the submenu trigger in the parent menu.
https://github.com/user-attachments/assets/d3821dee-959c-4d78-a498-78896d63b470
Expected behavior
Moving forward past the last submenu item should not dismiss the entire menu. The parent menu should remain available so the user can continue to its next item.
Reproducible example
Use the Nested menu demo on an iPhone with VoiceOver enabled:
- Open the Song menu.
- Open the Add to Playlist submenu.
- Swipe forward through its items until New playlist… is reached.
- Swipe forward once more.
The whole menu closes instead of allowing navigation to the following parent item, Play Next.
Base UI version
Current master branch (observed with commit e29ae4c3178716071eccc02688f65fab76836d6d).
Which browser are you using?
Safari on iPhone.
Which OS are you using?
iOS.
Which assistive tech are you using (if applicable)?
VoiceOver.
Additional context
This concerns moving forward past the last item in the submenu. It is separate from returning backward to the submenu trigger, tracked in #5793.
Source: mui/base-ui