Mastodon

Don’t sleep on accessibility requirements

Posted by Matt Birchler
— 1 min read

I came across this video today where a developer reviews a John Carmack tweet and ultimately comes to the conclusion that it’s obviously better to perform click actions on website with the “mouse down” event rather than the “mouse up” event, like most things do today. The argument is that it feels more snappy to do the thing the moment your mouse click happens rather than waiting the several milliseconds for the user to release their click.

I understand the instinct here, but the bad news is that doing this across the board on your site instantly makes your site non-compliant with one of the most basic level of WCAG accessibility. In short, there is a requirement that websites allow users to cancel accidental clicks, and triggering an action on mouse down removes that ability. This can be an issue for people who have trouble with fine motor skills and it’s an issue for literally anyone who accidentally clicks the wrong thing, and realizes it before they let go of the mouse (you know you’ve done it).

Now you might still want to use this more snappy interaction option because you think many people will appreciate it, and I get that as well. In order to make your software accessible to everyone, you should implement this as an option. You could even default it to on, but it must be easy to turn off by the user.