You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using <mat-form-field> with <mat-select> and <mat-label> Chrome prints out the following warning: Incorrect use of <label for=FORM_ELEMENT>
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.
@crisbeto You are right, I didn't not realize that it's only related to mat-select and not input (which makes sense). I updated the ticket to better reflect this.
Description
When using
<mat-form-field>
with<mat-select>
and<mat-label>
Chrome prints out the following warning:Incorrect use of <label for=FORM_ELEMENT>
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
<mat-select>
and<mat-label>
within<mat-form-field>
Expected Behavior
No error should be displayed
Actual Behavior
Incorrect use of
<label for=FORM_ELEMENT>
is printed for each mat-label within a mat-form-fieldEnvironment
The text was updated successfully, but these errors were encountered: