onMouseDown not accessible for keyboard users

I was watching this theo video https://www.youtube.com/watch?v=yaMGtiPckAQ and started to implement onMouseDown isntead of onClick for all my buttons. However I ran into a problem where now users cant use the buttons anymore with tab + space. Anyone has a fix for this instead of making a custom button component?
Theo - t3․gg
YouTube
“Act On Press” - John Carmack's Hot Take On UI
This John Carmack tweet got me thinking. Like, REALLY thinking. onMouseDown might be my goto in the future SOURCE https://twitter.com/id_aa_carmack/status/1787850053912064005 Check out my Twitch, Twitter, Discord more at https://t3.gg S/O Ph4se0n3 for the awesome edit 🙏
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?