bug(mat-menu-trigger): screen reader reads 2 states (expanded and then collapsed) on menu close for lazy load menus
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### 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
コントリビューションガイド
調査の方向性
src/example/menu-overview-example.html にあるリンク先の StackBlitz reproduction を開き、matMenuContent と NVDA を使用するメニューで問題を再現します。閉じるときとフォーカスを戻すときの mat-menu-trigger の動作から始めます。完了条件は、中間の expanded 状態なしに、trigger が collapsed としてのみ読み上げられることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- accessibility, frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100