Pointer cancellation
Silktide detects buttons and links that act the moment they are pressed down, rather than when the press is released. Acting on release gives people a chance to recover from pressing the wrong thing by sliding away before letting go.
Why this matters
Everyone occasionally presses the wrong button, but people with tremors, limited dexterity, or low vision do so far more often. The universal recovery gesture is to keep holding, drag off the control, and release - which works because buttons and links normally act on release. A control wired to react on the initial press takes that escape route away: the action fires instantly, with no way to abort. On a form submit or delete button, one slip becomes an irreversible mistake.
This is success criterion 2.5.2 (Pointer Cancellation), a requirement - part of the most basic conformance level.
How to fix it
- Trigger actions from the
clickevent, which fires on release, instead ofmousedown,pointerdown, ortouchstart. - If a control genuinely needs to respond to the initial press - for example, a piano key in a music app - make sure releasing off the control reverses or aborts the action, or provide an undo.
- If the flagged listener does not actually trigger an action (it may just add a visual pressed effect), you can the finding.
\/\/ Problem: fires immediately on press, cannot be cancelled
button.addEventListener('mousedown', submitForm);
\/\/ Fix: fires on release, so dragging away cancels
button.addEventListener('click', submitForm);
How Silktide tests this
- Load each page in a real browser and record the event listeners it registers.
- Find listeners for the press-down events:
mousedown,pointerdown, andtouchstart. - Report a listener when it is attached to a control normally activated on
release: a button, link, submit or reset input, or an element with an
role such as
button,link,menuitem,tab, orswitch. - Skip page-wide listeners not attached to a specific control, which usually belong to scrolling or drag-and-drop handling rather than activation.
- Because Silktide cannot tell what the listener's code does, findings are flagged for your confirmation rather than counted as confirmed failures.
Troubleshooting
The listener doesn't activate anything
Down-event listeners are often used for harmless effects: a pressed style, a
ripple animation, or focus management, with the real action still on click.
That satisfies the criterion; approve the finding.
The control is a slider or drag handle
Sliders, drag handles, and similar widgets legitimately track the initial press. WCAG treats the down-event as essential for these interactions; approve the finding.