Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(Mat Select): Keeps throwing FOR / ID error, when ID is given and visible in HTML #28943

Closed
1 task
dreamstar-enterprises opened this issue Apr 23, 2024 · 4 comments
Labels
needs triage This issue needs to be triaged by the team

Comments

@dreamstar-enterprises
Copy link

dreamstar-enterprises commented Apr 23, 2024

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 assign an ID to mat-select

<mat-select
id="jobTitle"

I get the error, in Chrome

The label's for attribute doesn't match any element id. This might prevent the browser from correctly autofilling the form and accessibility tools from working correctly.
To fix this issue, make sure the label's for attribute references the correct id of a form field.

Screenshot 2024-04-23 at 21 33 08

But the element with the id is clearly there (regularSiteOfWorking)

Screenshot 2024-04-23 at 21 32 02

Reproduction

StackBlitz link:
Steps to reproduce:
1.
2.

Expected Behavior

See above

Actual Behavior

See above

Environment

  • Angular:
  • CDK/Material:
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu):
@dreamstar-enterprises dreamstar-enterprises added the needs triage This issue needs to be triaged by the team label Apr 23, 2024
@crisbeto
Copy link
Member

Duplicate of #27241.

@dreamstar-enterprises
Copy link
Author

Thank you, but the other thread is closed, and the issue hasn't really been resolved if you read through the thread

@crisbeto
Copy link
Member

The fix for the other one was merged 2 hours ago.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs triage This issue needs to be triaged by the team
Projects
None yet
Development

No branches or pull requests

2 participants