JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.42k stars 4.1k forks source link

Incorrect user of <label for=FORM_ELEMENT> #5927

Open emaborsa opened 1 week ago

emaborsa commented 1 week ago

Dependencies:

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?