angular / angular/components

bug(menu)[matMenuTriggerFor]: Trigger does not update ARIA values correctly in OnPush components (Accessibility)

Offen
#29,041 7 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @adolgachev Auf GitHub ansehen
Accessibility area: material/menu P3
Vorherrschende Sprache
TypeScript
Sterne
25k
Forks
6.8k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
91

Beschreibung

### Is this a regression?

- [x] #31029

### The previous version in which this bug was not present was

_No response_

### Description

It seems like the issue : [26262](https://github.com/angular/components/issues/26262) has not been resolved,
The Trigger does not update aria values and misbehaves in OnPush components.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/angular-bqrgp1-p8dplp?file=src%2Fapp%2Fmenu-overview-example.ts
Steps to reproduce:
1. use NVDA Speech viewer
2. open the menu and select items (multiple times)
![screen reader](https://github.com/angular/components/assets/168361048/dcb419eb-be1e-4b4b-9c81-f3430d33931c)

### Expected Behavior

When selecting an item `menu-item` from the menu, the `aria-label` and `aria-expanded` should be updated correctly,
From the example above, NVDA should read item2 with menu being collapsed

### Actual Behavior

As shown in the screenshot, when we click on the item2, NVDA is reading item1 with the menu being expanded

### Environment

- Angular: 17.3.7
- CDK/Material: 17.3.7
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.