Lesson 22 of 30
A drag-and-drop reorder needs to feel controllable at every instant, not just correct once it's over — three visual states carry that feeling, and an honest accessibility gap sits underneath all of it that visual polish alone can't close.
12 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A drag-and-drop list's underlying reorder logic works correctly, but users describe the interaction as feeling "broken" or "accidental." There's no shadow, scaling, or opacity change when an item is picked up. What's the likely cause?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
A drag interaction lives or dies on feedback during the drag, not just on whether the final reorder is correct. Three visual states do that work:
.dragging {
box-shadow: var(--shadow-lg);
transform: scale(1.02);
opacity: 0.9;
cursor: grabbing;
}
.drop-indicator {
height: 2px;
background: var(--track-accent);
}
Idle — a plain, orderable list of three items.
Here's the honest part: native HTML5 drag-and-drop, and most custom pointer-based implementations built on mousedown/touchstart, are mouse- and touch-only by construction. A keyboard-only user, or a screen-reader user navigating without a mouse, cannot pick an item up and drop it using Tab and Enter alone — there's no clean "keyboard version" of a spatial pointer gesture. aria-grabbed and aria-dropeffect existed as an attempt at this and were deprecated from the ARIA spec precisely because labeling a drag target doesn't give a keyboard user any way to actually perform the drag.
A "here's a Kanban board, walk me through the drag interaction" prompt is testing two separate things at once — whether a candidate can name the visual states that make dragging feel controllable, and whether they'll volunteer the accessibility gap unprompted rather than needing to be asked "but what about keyboard users?"