Eslint warning using OnClick not on Buttons
Unanswered
Rex posted this in #help-forum
RexOP
I want to find a way to use OnClick function on html elements without getting a warning from eslint, is it possible?
(I already tried setting off to this rules, but nothing changed)
And do you know if avoiding this warning affects the performance or experience in the app?
Thank you
(I already tried setting off to this rules, but nothing changed)
And do you know if avoiding this warning affects the performance or experience in the app?
Thank you
2 Replies
Toyger
is it nextjs? it shouldn't have such warnings by default
Komondor
Maybe you have to give it a role
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-noninteractive-element-interactions.md
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-noninteractive-element-interactions.md