ACT-007a Offer a way without dragging for everything people can drag
- Level
- Rule
- Verdict
- Requirement
- Area
- Actions
- Status
- proposed, version 1.0.0
Rule
Anything people can do by dragging on the page can also be done with a single pointer and no dragging, such as buttons, a menu or a field. A keyboard route alone does not count, and the other way may not be a swipe or another gesture that follows a path.
Examples
Live examples built with Justified's components. Try them with the mouse, the keyboard or a screen reader.
Do: Move up and Move down on each row
Playlist order
Space picks up and drops the item, the up and down arrow keys move it, Escape cancels.
- Night drive
- Slow river
- Paper boats
- Late train
- Salt flats
Do: Tap a card, then choose a column
Sprint board
Space picks up and drops the item, the up and down arrow keys move it, Escape cancels.
To do
In progress
Done
Don't: Dragging, and arrow keys while picked up
Playlist order
Space picks up and drops the item, the up and down arrow keys move it, Escape cancels.
- Night drive
- Slow river
- Paper boats
- Late train
- Salt flats
Why
A drag asks for a lot: press, hold, move and let go in the right place, all in one steady motion. People with a tremor, weak hands, a head pointer or a mouth stick, and anyone on a crowded train, can miss the spot or fail to hold on. WCAG 2.2, 2.5.7 Dragging Movements requires that whatever a drag does can also be done with a single pointer without dragging. The Understanding page for 2.5.7 is clear that keyboard support is judged on its own: a person tapping on a phone or steering a head pointer has no keys to press, so they need something to click. A separate control elsewhere on the page is fine, as long as it gets the same result, and a field people type into counts too. It must not be a swipe or a flick, which 2.5.1 Pointer Gestures treats as a path. The keyboard route is a separate requirement and sits in KBD-001. Buttons and menus serve both at once, because they also take focus.
Do
- On a Sprint board built with dnd-kit, give each card a
DropdownMenulabelled Move card with Move to To do, Move to In progress and Move to Done. The card can still be dragged; the menu is the way without dragging. - In a sortable list Playlist order, give each row Move up and Move down buttons, or a Move to position field that takes a number. The drag handle stays for those who like it.
- Make sure the drag handle
buttonthat carries dnd-kit's{...listeners}does not swallow the click that should open the row's menu. Test it by clicking without moving. - Adding dnd-kit's
KeyboardSensoris needed for KBD-001, but it does not meet this rule. Add the buttons or the menu as well. - For an upload area built with react-dropzone, keep a real
Buttonlabelled Choose file that callsopen(), or make the whole zone a button that opens the file picker and say so in its text: "Drop a file here or choose one". Do not setnoClick: truewithout that button. Both 2.5.7 and 2.1.1 point to this; the Understanding page does not name file uploads. - Keep the shadcn
Slideras it is: a click on the track moves the thumb there. For a custom range picker such as Budget, £0–£2,000, put a labelled numberInputbeside each thumb, kept in step with it. - Give a shadcn
Resizablepanel Preview a Collapse preview button or a menu with set widths, since the handle can only be dragged or moved with keys. - Keep
CarouselPreviousandCarouselNexton a shadcnCarouselthat can be dragged, even when the design looks cleaner without them. - A Vaul
Drawerthat closes by dragging down keeps a way to close it by pressing, such as a Close button or a click on the overlay, which a modal drawer closes on by default. A drawer withmodal={false}has no overlay, so it needs the button. - Rows with swipe actions, such as a swipe that marks a row in Bills as paid, keep the same actions in a row menu.
- In an image cropper Crop photo, offer set ratios such as Square and 4:3 and number fields for width and height. A map that pans by dragging gets arrow buttons and Zoom in and Zoom out.
- The controls may appear only once an item is selected. On a seating plan Table layout, a tap on a guest's pin shows Move to table with a list of tables. They must then be reachable without dragging and meet ACT-006 as targets.
- Our own advice, beyond the law: keep the other way visible. The law accepts a control that is visually hidden as long as a pointer can operate it, but a visible button is found by more people.
- A long press may start a drag on touch. The move that follows still needs a way without dragging.
Don't
- Let the order of Playlist order change only by dragging rows, and count arrow keys while a row is picked up as the alternative.
- Offer a swipe left on a row as the only other way to delete it.
- Build a volume knob for Master volume from
divs with onlyonPointerMove, so the level can be set only by dragging round the knob. - Build a two-thumb range where a click on the track does nothing and there are no fields.
- Remove the arrows from a carousel because the slides can be dragged.
- Use a slider puzzle as a check before sign-in. It fails here as well as under FRM-008.
Exceptions
- The movement is the point. When the path of the drag is the content, such as a signature pad or freehand drawing in Inkhollow, the drag is exempt. Putting an item in a chosen place is not exempt, because the place can be chosen by pressing. KBD-001 has the matching exception for the keyboard.
- Scrolling that the browser provides. Native scrolling, including
overflowareas and the browser's own pull to refresh, is outside the rule. A custom area that blocks the browser's scrolling and moves its content by dragging is inside it again. - Neighbouring rules. The keyboard route for the same task is KBD-001. What assistive technology hears during a keyboard move is ACT-007b, and the mark on the place where a dragged item will land is ACT-008. Undo after a move that loses something is DST-001a.
Verdict
Requirement. Only the judges decide; the expert witnesses are shown but do not vote. How verdicts work
| Source | Role | Stance | Page |
|---|---|---|---|
| WCAG 2.2 | Law | Requires | 2.5.7 Dragging Movements |
| WCAG 2.2 | Law | Supports | 2.5.1 Pointer Gestures |
| WCAG 2.2 | Law | Supports | 2.1.1 Keyboard |
| Material Design | Judge | Supports | Bottom sheets: guidelines Loading indicator: accessibility Gestures |
| Apple Human Interface Guidelines | Judge | Supports | Drag and drop Gestures |
| Carbon Design System | Judge | Supports | File uploader usage File uploader accessibility Slider accessibility |
| GOV.UK Design System | Expert witness | Supports | File upload Question pages |
| Nielsen Norman Group | Expert witness | Supports | Drag–and–Drop: How to Design for Ease of Use, by Page Laubheimer |
Each stance links to the page it rests on, read on the date in the source register. This page never repeats what a source says; read the source itself.
History
- Version 1.0.0, : First version.
Last checked against the other rules for conflicts on .
More in Actions: 11 rules and 4 guidelines · All rules
Justified is an independent project. It is not affiliated with, sponsored or endorsed by the organisations whose guidance it cites. Read the full statement.
Apple is a trademark of Apple Inc., registered in the U.S. and other countries and regions.