Skip to content

bug(MAT-SELECT): Incorrect use of <label for=FORM_ELEMENT> Angular Material #28527

@Dilhando

Description

@Dilhando

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

When I'm using a <mat-select> associated with a <mat-label> inside a <mat-form-field>, my Chrome browser's console outputs a Incorrect use of <label for=FORM_ELEMENT> Angular Material error (click this to open the related StackOverflow question).

Reproduction

Steps to reproduce:

  1. Navigate to 'https://material.angular.io/components/select/overview' using Google Chrome
  2. Open Chrome's console and click on '12 issues', you should see the error in your console (cf. Screenshot).
Screenshot 2024-02-02 at 14 09 45

Expected Behavior

I expect <mat-select> and <mat-label> standard use case to be error-less in Chrome.

Actual Behavior

My console outputs an error.

Environment

  • Angular: 16.0.4
  • CDK/Material: 16.0.3
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): MacOS Ventura 13.6

Metadata

Metadata

Assignees

Labels

needs triageThis issue needs to be triaged by the teamneeds: clarificationThe issue does not contain enough information for the team to determine if it is a real bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions