This document is in beta. Help us by reporting issues via Github or email.
On this page:
If an interactive control fires as soon as it is touched, it causes difficulties for people with visual disabilities, cognitive disabilities, motor impairments, and many others.
It is better when there is a way to ‘undo’ or change your mind (for example, by dragging your mouse or finger away after having clicked or touched a control). This avoids accidentally triggering things on a page.
2.5.2 Pointer Cancellation: For functionality that can be operated using a single pointer, at least one of the following is true: (Level A)
No Down-Event: The down-event of the pointer is not used to execute any part of the function;
Abort or Undo: Completion of the function is on the up-event, and a mechanism is available to abort the function before completion or to undo the function after completion;
Up Reversal: The up-event reverses any outcome of the preceding down-event;
Essential: Completing the function on the down-event is essential. (Functions that emulate a keyboard or numeric keypad key press are considered essential.)
See the W3C’s detailed explanation of this guideline with techniques and examples.
click
or mouse-up
events, not mouse-down
eventsUsing click events will only trigger the event on release.
This document is in beta. Help us by reporting issues via Github or email.