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

jsx-a11y/label-has-associated-control gives error when for is put #961

Closed
TheElegantCoding opened this issue Nov 4, 2023 · 4 comments · Fixed by #979
Closed

jsx-a11y/label-has-associated-control gives error when for is put #961

TheElegantCoding opened this issue Nov 4, 2023 · 4 comments · Fixed by #979

Comments

@TheElegantCoding
Copy link

This is my config

'jsx-a11y/label-has-associated-control': 'error'

i am not in react i use "for", this make me error in the code only when i put htmlFor works but i cant do that i dont use react

return (
  <>
    <label for="email" />
    <input id="email" name="email" type="text" />
  </>
)
@ljharb
Copy link
Member

ljharb commented Nov 4, 2023

Most jsx renderers match react, since react invented jsx. It’d be reasonable to add a setting that can rename htmlFor as “for”, i suppose.

@TheElegantCoding
Copy link
Author

not all jsx renderes match that, i am in solidjs so yeah it will be nice

@felquis
Copy link

felquis commented Feb 27, 2024

It's missing aria-label attribute in the label element

This was referenced Apr 8, 2024
@TheElegantCoding
Copy link
Author

wating for this support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants