click-events-have-key-events applies to native buttons and links
See original GitHub issueNative elements like <button>
or <a>
(also counting <nuxt-link>
/ <router-link>
into it) don’t need additional handlers beside a @click
or @click.native
listener.
Adding another handler for keydown events will actually lead to bugs and double execution of the function.
Maybe we should add a whitelist to that rule
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Element: click event - Web APIs | MDN
An element receives a click event when a pointing device button (such as a mouse's primary mouse button) is both pressed and released...
Read more >React onClick event handlers: A complete guide
Learn the basics of React's onClick event handler, including event listening, onClick buttons, synthetic events, custom events, and more.
Read more >Handling Events - React
React events are named using camelCase, rather than lowercase. With JSX you pass a function ... <button onClick={activateLasers}> Activate Lasers </button>.
Read more >React onClick Event Handling (With Examples) - Upmostly
Whenever you need to perform an action after clicking a button, link, or pretty much any element, you'll use the onClick event handler....
Read more >Buttons - Android Developers
To define the click event handler for a button, ... The method you declare in the android:onClick attribute must have a signature exactly...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Would be cool if this could get fixed.
@maranran I’m having this problem even with button elements:
Eslint throws:
Visible, non-interactive elements with click handlers must have at least one keyboard listener.
I’m using the extends recommended