WCAG 2.5.2: Pointer Cancellation
WCAG 2.5.2 Pointer Cancellation is a level A success criterion from WCAG 2.1. The down-event of a pointer should not complete the action. People need to move away to cancel, or undo the action.
Someone who presses down by mistake can slide off a button to cancel.
How to test
Press down on Add to basket and drag off before release. The item should not be added.
How to fix
Trigger actions on click or pointerup, not pointerdown.
Example that fails
A script adds the product on mousedown.
Example that passes the check
The product is added on click, and dragging off cancels it.
Shopify
Do not bind add-to-cart on mousedown in custom theme scripts.
WooCommerce
Keep the default click behaviour on add to basket.
WordPress
Bind buttons to click, not mousedown.
Wix
Use button click actions, not pointer-down code.