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

Incorrect user of <label for=FORM_ELEMENT> #5927

Open
emaborsa opened this issue Jun 25, 2024 · 0 comments
Open

Incorrect user of <label for=FORM_ELEMENT> #5927

emaborsa opened this issue Jun 25, 2024 · 0 comments
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet

Comments

@emaborsa
Copy link

Dependencies:

  • "react": "^18.2.0"
  • "react-dom": "^18.2.0"
  • "react-hook-form": "^7.51.5"
  • "react-router-dom": "^6.22.3"
  • "react-select": "^5.8.0"

I use the element label with the Select component. In the log I read:

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.

Then I found that the Select component has an id and an inputId property. The first is set to the container, the latter to the search input (?).
Is there a way to fix this issue?

@emaborsa emaborsa added the issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet
Projects
None yet
Development

No branches or pull requests

1 participant