components icon indicating copy to clipboard operation
components copied to clipboard

bug(mat-menu-trigger): screen reader reads 2 states (expanded and then collapsed) on menu close for lazy load menus

Open valentyna-sidorova-simpligov opened this issue 1 year ago • 0 comments
trafficstars

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

  • Angular: 18.2.6
  • CDK/Material: 18.2.6
  • Browser(s): Chrome Version 129.0.6668.72
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 11