Irreversible action occurs on down event

Link to Irreversible action occurs on down event copied to clipboard

touch-down-event

Rule

For functionality that can be operated using a single-pointer at least one of the following MUST be true: no down-event, abort/undo, up reversal, or essential.

Background

When events can be triggered on the down-event (e.g. when the mouse button is pressed down vs when it is released or when the finger touches the screen vs when it is lifted) users with tremors or other motor disabilities are more likely to unintentionally trigger unwanted actions. Functionality should be executed on the pointer up-event (e.g. when the mouse button is released or finger lifted). This can be accomplished by using generic HTML elements or JavaScript click events that happen on the up event by default. When an action happens on the up-event, the user can verify that their finger or mouse pointer is over the correct location before lifting it to cause the action. NOTE: For complex interactions such as drag and drop - where an object is selected on the down-event so it can be dragged to another location - the requirement is to provide a way to Abort or Undo the action. For example, providing a confirmation dialog to confirm the drop location with the ability to undo the move or the ability to move the item back to its original location before releasing it and thereby aborting the action.

How to Fix

Fix this issue by using ONE of the following techniques:

  1. Use a native HTML element for the function, such as <a> or <button>.
  2. Use a generic JavaScript click event for the function.
  3. Provide an opportunity for the user to confirm or abort the action before completing it.
  4. Provide a mechanism to undo the action after it is completed.