bug(mat-menu-trigger): screen reader reads 2 states (expanded and then collapsed) on menu close for lazy load menus #29844
Labels
area: material/menu
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Description
When using screen readers and lazy load menu, the menu closes faster than the state (aria-expanded) updates so when the trigger refocuses it has an expanded state. Then it changes to collapsed state, which causes reading 2 states.
Reproduction
StackBlitz link: https://stackblitz.com/edit/2tyoy4?file=src%2Fexample%2Fmenu-overview-example.html
Steps to reproduce:
Use any menu with matMenuContent
Expected Behavior
NVDA log:
Menu
menu clickable Item 1 menu item
Menu menu button collapsed subMenu
Actual Behavior
NVDA log:
Menu
menu clickable Item 1 menu item
Menu menu button expanded subMenu
collapsed
Environment
The text was updated successfully, but these errors were encountered: