angular / angular/components

bug(mat-error): mat-error presentation is announces twice with NVDA screen reader

Aperta
#32,104 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Accessibility area: material/form-field P2
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

### Is this a regression?

- [x] Yes, this behavior used to work in the previous version

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

@angular/material 18.1.0 did not have this behavior

### Description

Hi,

I am using NVDA v2025.3 (latest version) for accessibility testing and have noticed that the mat-error presentation is announced twice by the screen reader.

Image

The above example demonstrates the issue from the angular material docs:
https://material.angular.dev/components/form-field/overview#error-messages

### Reproduction

Steps to reproduce:
1. Open screen reader and set focus on an angular material mat-form-field with mat-error presented on blur
2. Tab away from the field to trigger error message presentation
3. Observe announcements and notice that mat-error text is read twice.

### Expected Behavior

mat-errors should only be announced a single time by the screen reader.

### Actual Behavior

mat-error is announced twice by the screen reader.

### Environment

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con l’esempio dei messaggi di errore di Angular Material form-field collegato nel report e riproduci il comportamento usando NVDA, concentrandoti sugli errori mostrati quando il campo perde il focus. Confronta gli annunci con la lettura singola prevista e identifica il percorso di presentazione degli errori di form-field coinvolto; il lavoro è completo quando mat-error viene annunciato una sola volta senza regressioni rispetto al comportamento documentato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
accessibility, frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.