markusenglund / react-switch

A draggable toggle-switch component for React. Check out the demo at:
https://react-switch.netlify.com/
MIT License
1.33k stars 101 forks source link

Getting ESLintError for LABEL must have nesting, id and label-has-for types #76

Closed gxwheel152 closed 3 years ago

gxwheel152 commented 4 years ago

I am getting ESLintError for LABEL must have nesting, id and label-has-for types.

esLint: warning Form label must have ALL of the following types of associated control: nesting, id jsx-a11y/label-has-for

I believe I've added in both the htmlFor & the aria-labeledby (after getting the error). My Switch Component was already nested within the label (per my understanding), but am still getting the error.

Anything I'm missing. This is a newer error.

`

{" "} {" "} TEAM STATS
            </label>

`

markusenglund commented 3 years ago

I don't know, I couldn't reproduce the problem