angular / angular/components

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

Ouverte
#32,850 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Accessibility area: material/form-field P4
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

### 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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la reproduction StackBlitz liée et l’implémentation de MatFormField, en vous concentrant sur les éléments de support et le sélecteur matformfieldlineripple décrit dans le rapport. Vérifiez comment un contenu hint et error vide produit le wrapper hint, puis vérifiez avec VoiceOver que les éléments qui n’apportent rien sont ignorés et que l’input et le texte de test attendus restent audibles.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
accessibility, frontend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.