Chrome complaining about "illegal use of labels"
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### Description
When using `` with `` and `` Chrome prints out the following warning:
**`Incorrect use of `**
I assume this is a new check Chrome added in a recent versions to it's dev tools. Though I guess Angular Material should probably comply to those, if at all possible.
### Reproduction
This can be easily reproduced, even on the Angular Material Page, e.g. on https://material.angular.io/components/form-field/overview (though it appears on any page that uses `` and `` within ``

### Expected Behavior
No error should be displayed
### Actual Behavior
**Incorrect use of ``** is printed for each mat-label within a mat-form-field
### Environment
- Angular: 17.0.1
- CDK/Material: 17.0.1
- Browser(s): Chrome 117
- Operating System: Windows
Beitragsleitfaden
Rechercherichtung
Beginne damit, die Warnung auf der Angular Material-Übersichtsseite für Form-Felder mit mat-form-field, mat-select und mat-label zu reproduzieren, und verfolge dann, wie diese Komponenten ihre Label-Zuordnung rendern. Die Aufgabe ist abgeschlossen, wenn Chrome in diesem Szenario keine inkorrekte Verwendung des label-for-Attributs mehr meldet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- accessibility, frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100