angular / angular/components

bug(mat-form-field): VoiceOver reads multiple group, set aria-hidden to supporting elements

Aperta
#32,850 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Accessibility area: material/form-field P4
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

related to #32797

Supporting elements in `MatFormField` should have `aria-hidden="true"` here because they do not contribute to accessibility. I suggest the "Ripple" family of components, in this case selector `matformfieldlineripple` but also in all other places, to automatically add `aria-hidden="true"`.

If hints and errors are empty, `MatFormField` still renders a hint wrapper, which then would read as an empty "group". In this case, this wrapper should also be "aria-hidden="true".

### Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-starter-cudkchbv?file=src%2Fmain.ts
Steps to reproduce:
1. enable VoiceOver
2. navigate through elements

### Expected Behavior

At best, it should should skip the first "input", directly read "Input, edit text" and after that "test"

### Actual Behavior

VoiceOver is reading the following at each navigation step:
1. Input
2. Input, edit text
3. group
4. group

### Environment

- Angular: tested with 18 and 20
- CDK/Material: tested with 18 and 20
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS 26

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dalla riproduzione StackBlitz collegata e dall’implementazione di MatFormField, concentrandoti sugli elementi di supporto e sul selettore matformfieldlineripple descritto nel report. Verifica in che modo il contenuto vuoto di hint ed error produce il wrapper di hint, quindi verifica con VoiceOver che gli elementi che non contribuiscono vengano ignorati e che l’input e il testo di test previsti rimangano udibili.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.