Verify dragging movements
Description
This rule does not automatically validate anything. It simply reminds you to manually verify that functionality operated by a dragging movement can also be achieved with a single pointer without dragging, following WCAG Success Criterion 2.5.7 Dragging Movements.
All functionality that uses a dragging movement for operation can be achieved by a single pointer without dragging, unless dragging is essential for the functionality or the functionality is determined by the user agent and not modified by the author.
The audit flags candidate elements such as div[draggable="true"], elements with the class .sortable-item, custom sliders (.slider), and range inputs (.range-input) so a human can inspect each interaction in the real page. Dragging is essential for some tasks (for example moving a map or text selection) and native HTML5 drag-and-drop reused without author changes is determined by the user agent – both are exempt – but every other drag-based control needs a single pointer alternative such as move arrows, a select-and-place flow, or a numeric input that changes the same value.
Disabilities impacted
- Motor control – People with tremors, arthritis, reduced muscle control, or paralysis find it hard or impossible to press and hold a pointer while steering in a precise path and releasing over an exact drop target. Dragging demands continuous fine motor control that these users cannot reliably sustain.
- Cognitive – The multi-step gesture of press, drag, and drop is hard to understand and remember for people with cognitive or learning disabilities, especially when the reordering effect only becomes visible after release.
- Visual – Screen reader users and people with low vision cannot see the drag handle, the floating ghost, or the highlighted drop zone, so they cannot track where an item will land. They depend on a predictable, focus-based alternative.
- Temporary impairment – Users with an injury, a one-handed situation, or a stylus-only device face the same precision problems. An alternative control makes the interface usable for everyone, not only permanent conditions.
Why it matters
Drag-based interactions are widespread in dashboards, kanban boards, settings screens, and e-commerce pages, yet they are among the least accessible patterns on the web. Without a single pointer alternative, users are blocked from core functionality such as reordering tasks, adjusting values, or sorting products. This creates exclusion for assistive technology users and can expose the site to legal risk under ADA, the European Accessibility Act, and Section 508.
Beyond compliance, a select-and-place alternative reduces user errors on tablets and touch devices, speeds up precision tasks, and supports mouse, touch, pen, and keyboard equally. Designing for the single pointer constraint improves reliability for every input method and makes the interaction more discoverable, because there is always an obvious, labeled control instead of a hidden gesture.
Coding problems and solutions
Common coding problems
- Drag is the only operation – List items can be reordered only by dragging; no move buttons, select control, or grab-and-place flow exists.
- Custom sliders that only follow the pointer – A
<div role="slider">changes value only while the pointer moves, ignoring arrow keys, taps on the track, and assistive tech. - No visible affordance – Drag handles have no focus outline, tooltip, or accessible name, so users cannot tell an element is draggable or where it can be placed.
- No state announcements – After an item moves, nothing is announced and focus is lost, leaving screen reader users unaware that the order changed.
- Mouse-only logic – Code listens to
mousedown/mousemove, excluding touch and pen, and provides no single-tap placement. - Dragging always active – There is no drag-mode toggle, so accidental pointer movement starts an unwanted drag and triggers unintended drops.
How to fix it
Provide a select-and-place alternative to drag-and-drop
Each sortable item also offers explicit move buttons that a single pointer can activate on its own.
<ul class="sortable-item" aria-label="Playlist order">
<li>
<span>Song: Contraband</span>
<button type="button" aria-label="Move Song: Contraband up">Move up</button>
<button type="button" aria-label="Move Song: Contraband down">Move down</button>
</li>
</ul>Dragging is the only way to change the order; keyboard and single pointer users are stuck.
<ul class="sortable-item">
<li draggable="true">Song: Contraband</li>
<li draggable="true">Song: Red Handed</li>
</ul>Make sliders operable without a drag gesture
A native range is keyboard operable out of the box, and the companion number input offers an exact single pointer alternative.
<label for="brightness">Brightness</label>
<input type="range" id="brightness" min="0" max="100" value="50">
<label for="brightness-value">Brightness (exact value)</label>
<input type="number" id="brightness-value" min="0" max="100" value="50">A custom slider that only changes while the pointer drags hides the control from every other input method.
<div class="slider" role="slider" tabindex="0"
aria-valuemin="0" aria-valuemax="100" aria-valuenow="50">
<div class="slider-thumb"></div>
</div>
<!-- Pointer drag is the only way to change the value -->Let users activate drag mode explicitly
Dragging is off by default; a single click toggles the mode with a clear pressed state, so accidental movement does nothing.
<button type="button" id="drag-toggle" aria-pressed="false">Enable drag mode</button>
<p id="drag-status" aria-live="polite">Drag mode is off.</p>
<ul id="task-list" aria-label="Reorder task list">
<li draggable="false">Design review</li>
<li draggable="false">Write tests</li>
</ul>Dragging is always active and there is no way to turn it off or to reach the same behavior without a gesture.
<div draggable="true" class="sortable-item">
Sorting happens while you drag; there is no switch to turn it off.
</div>Provide a long-press, tap-to-place flow for touch
A long press picks the item up, a regular pressure always selects the next item, and placement happens on the first tap. The timer is always cleared and the pointer type check keeps the gesture optional.
const longPressTimer = { id: null };
let dragModeActive = false;
const listItem = document.querySelector('.sortable-item');
function activateDragMode() {
dragModeActive = true;
listItem.classList.add('is-selected');
}
function placeItemAt(target) {
listItem.parentNode.insertBefore(listItem, target);
dragModeActive = false;
listItem.classList.remove('is-selected');
}
const onPointerDown = (event) => {
if (event.pointerType === 'touch' || event.pointerType === 'mouse') {
longPressTimer.id = globalThis.setTimeout(activateDragMode, 500);
}
};
const onPointerUp = (event) => {
if (longPressTimer.id !== null) {
globalThis.clearTimeout(longPressTimer.id);
longPressTimer.id = null;
}
const dropTarget = document.elementFromPoint(event.clientX, event.clientY);
if (dragModeActive === true && dropTarget !== null) {
placeItemAt(dropTarget);
}
};
// Don't forget later remove event listeners when they aren't needed; eventually use { once: true } option
listItem.addEventListener('pointerdown', onPointerDown);
listItem.addEventListener('pointerup', onPointerUp);
Known Limitations
- Manual-only rule – Because this rule performs no automated validation, it cannot catch issues by itself and depends entirely on developer or tester judgment when reviewing each flagged element.
- Limited selector coverage – Only candidate elements matching
div[draggable="true"],.sortable-item,.slider, or.range-inputare listed; drag widgets using other class names or markup may not be reported at all. - Shadow DOM and iframes – Nodes living inside shadow roots or cross-origin iframes may not be scanned, so nested drag controls can be overlooked.
- Single-page applications – Lists rendered with a framework after the audit snapshot (virtualized or lazily mounted items) may not exist yet when elements are collected and are therefore missed.
- Essential drag not judged – The rule cannot decide whether dragging is essential (for example map panning, or native HTML5 drag-and-drop reused unchanged), so a human must apply the exemption correctly.
- No interaction simulation – No real pointer gestures are performed, so the rule cannot confirm that a provided alternative actually works at runtime or that state changes are announced.
Resources
- W3C – Understanding Success Criterion 2.5.7
- MDN – HTML Drag and Drop API
- MDN – draggable global attribute
- MDN – input type=”range”
- W3C – ARIA Authoring Practices Slider Pattern
Rule
- Audit: accessibility
- Standard: WCAG
- Level: AA
- Success Criteria: 2.5.7
- Rule ID:
dragging_movements