ACT-008 Mark where a dragged item would land, and only while it is over that place
- Level
- Rule
- Verdict
- Unanimous (2 of 2)
- Area
- Actions
- Status
- proposed, version 1.0.1
Rule
While something is being dragged, mark on screen the place that would receive it if it were let go now. Remove the mark as soon as the dragged thing leaves that place, is dropped or the drag is cancelled.
Examples
Live examples built with Justified's components. Try them with the mouse, the keyboard or a screen reader.
Do: A line in the gap where the row would go
Reading list
Space picks up and drops the item, the up and down arrow keys move it, Escape cancels.
- Middlemarch
- Persuasion
- The Hobbit
- Dracula
Do: The column under the card, and only that one
Sprint board
Space picks up and drops the item, the up and down arrow keys move it, Escape cancels.
To do
- Draft the FAQ
- Update footer links
In progress
- Fix login bug
Done
- Write release notes
Don't: Columns stay marked after the card has gone on
Sprint board
Space picks up and drops the item, the up and down arrow keys move it, Escape cancels.
To do
- Draft the FAQ
- Update footer links
In progress
- Fix login bug
Done
- Write release notes
Don't: Only the border changes colour
Sprint board
Space picks up and drops the item, the up and down arrow keys move it, Escape cancels.
To do
- Draft the FAQ
- Update footer links
In progress
- Fix login bug
Done
- Write release notes
--input) to blue (--primary) with the same weight and no fill. The two differ by about 2.2 to 1 in lightness in the light theme and 1.8 to 1 in the dark one, under the 3:1 that VIS-003a asks for, so the change is a change of hue and little else, and it is easy to miss which column is meant.Why
A drag is a promise made in advance: let go here and this will happen. Without a mark on the landing place, people let go and then look to see what they did, and a row in the wrong slot or a file that missed the zone is found only afterwards, if at all. A mark that stays after the item has moved on is worse, because it points at a place that will not get the drop. No WCAG criterion asks for a drop mark. Once there is one, WCAG 2.2, 1.4.11 Non-text Contrast asks 3:1 for the part people need to see it, and 1.4.1 Use of Color rules out a change of hue as the only sign. The mark is for people who can see the screen; what assistive technology hears is ACT-007b.
Do
- In a sortable list Reading list built with dnd-kit, read the sortable
overid and draw a 2px line in the gap where the row will go. Do not rely on rows shuffling throughtransformalone, which shows nothing when the layout does not move them. - On a board, read
isOverfromuseDroppableon each column and give the column under the card a thicker border and a light fill. - With nested targets, such as a card inside a column, mark only the one that would take the drop.
- In a react-dropzone area, change the zone while a file is over it, using
isDragActive: a tinted fill with an upload icon and the text "Release to upload". - Clear the mark in
onDragEndandonDragCancel, so it is gone after a drop and after Escape. - Show the same mark during a keyboard move with dnd-kit's
KeyboardSensor. Sighted keyboard users need it too. - Keep the drag-over mark distinct from the focus ring on a zone that can also be clicked (ACT-007a). They are different states; KBD-001 owns the ring.
- Our own choice, beyond the rule: give the held item a raised look or a lighter copy that follows the pointer; show no mark, or a "not allowed" sign, over a place that cannot take the item; and on touch, draw the line ahead of the finger rather than under it.
- When saving after a drop fails, FBK-002 applies. Our own choice: do not let the item snap back without a word. The item may sit in its new spot before the save is done, as STA-005a's exception for a change shown at once allows. A placeholder there while it saves, which follows STA-001, also works.
Don't
- Let a column stay highlighted after the card has been carried on to the next one.
- Mark a column and the card inside it at once, so it is unclear which one takes the drop.
- Change only the hue of the zone's border, from one colour to another of about the same lightness, with no change in weight or fill. Without a 3:1 lightness difference, colour is the only sign (VIS-003a).
- Leave a drop zone looking the same whether or not a file is over it.
- Keep the mark on screen after the person pressed Escape.
Exceptions
- No drag. A place that is chosen by pressing, such as the Move to menu in ACT-007a, needs no drop mark.
- Neighbouring rules. The way without dragging is ACT-007a, the words for assistive technology are ACT-007b, and the focus ring is KBD-001.
Verdict
Unanimous (2 of 2). Only the judges decide; the expert witnesses are shown but do not vote. How verdicts work
| Source | Role | Stance | Page |
|---|---|---|---|
| WCAG 2.2 | Law | Supports | 1.4.11 Non-text Contrast |
| WCAG 2.2 | Law | Supports | 1.4.1 Use of Color |
| Material Design | Judge | No position | |
| Apple Human Interface Guidelines | Judge | Supports | Drag and drop Gestures |
| Carbon Design System | Judge | Supports | File uploader usage |
| GOV.UK Design System | Expert witness | Supports | File upload |
| 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.1, : The item in its new spot before the save is done now points to STA-005a's exception for a change shown at once.
- 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.