angular / angular/components

bug(Chip - chip-grid): Error not announced in screen readers on blur

Aperta
#28,940 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area: material/chips P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

### Is this a regression?

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

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

_No response_

### Description

Due to timeout on `_blur()` function in `chip-grid.ts` the errors that are shown are not announced.
https://github.com/angular/components/blob/main/src/material/chips/chip-grid.ts#L407

![image](https://github.com/angular/components/assets/116736167/27a31548-6cf9-495c-9ab0-37e0930c1e74)

### Reproduction

StackBlitz link: https://stackblitz.com/edit/qmuavp-wu5wvf?file=src%2Fexample%2Fchips-form-control-example.html
Steps to reproduce:
1. Add required form control
2. Blur from the input

### Expected Behavior

Screen reader should read the error shown on blur.

### Actual Behavior

Screen reader isn't reading the error shown on blur.

### Environment

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia in src/material/chips/chip-grid.ts intorno alla riga 407 e riproduci il problema con l’esempio StackBlitz collegato usando un controllo del modulo obbligatorio. Segui il timeout di _blur() e verifica che l’errore mostrato dopo aver perso il focus venga annunciato da uno screen reader.

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.