This document is in beta. Help us by reporting issues via Github or email
On this page:
Make sure that custom buttons or links do not activate as soon as they are touched, so that users can slide their finger or mouse away to cancel the action.
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/screen.
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.
This section needs more content. Contribute via Github or email.
This section needs more content. Contribute via Github or email.
This section needs more content. Contribute via Github or email.
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