Accessibility

2.5.2 - Pointer cancellation

Intent


The intent of this success criterion is to make it easier for users to prevent accidental or erroneous pointer input. People with various disabilities can inadvertently initiate touch or mouse events with unwanted results.

WCAG 2.1 Level AA

Benefits for users with:

  • low vision
  • cognitive limitations
  • motor impairments
  • all users who accidentally hit the wrong target

Ways to meet the criterion


For functionality that can be operated using a single pointer, at least one of the following is true:

  • 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. This requirement applies to web content that interprets pointer actions and does not apply to actions that are required to operate the user agent or assistive technology.

Drag and drop function

A drag-and-drop interface allows users to sort vertically stacked cards by picking up one card with the pointer (down-event), move it to a new position, and insert it at the new location when the pointer is released (up-event). Releasing the pointer outside the drop target area reverts the action, i.e., it moves the card back to the old position before the interaction started.

Testing principles

Open the content on a device with pointer inputs (mouse, touchscreen, stylus) and for all available controls (buttons, links, complex widgets):

  1. trigger down-events (i.e. by pressing but not releasing the mouse button, or placing a finger or stylus on the touchscreen) and check if functionality is executed prior to the up-event (i.e. releasing the mouse button or lifting the finger/stylus)
  2. if functionality was executed on the down-event, check if triggering the up-event (releasing the pressed mouse button, or lifing the finger or stylus from the touchscreen) reverses the outcome
  3. evaluate if it could be deemed essential for the controls to execute and complete functionality on the down-event

If #1 is true, and #2 and #3 are false then the content fails the success criterion.

Success and failure examples


Success Call to action activation

Tap/click and release activates the action.

Failure Call to action activation

Tap/click activates the action.

Success Cancelling activation

Tap/click and hold and slide to the outside of the call to action area cancels the action.

Failure Cancelling activation

Tap/click activates the action so users cannot cancel the action.