Explore Bato Web Agency Webflow Certified Partner Profile Explore Bato Web Agency Webflow Certified Partner Profile

How do you provide a keyboard alternative to drag-and-drop controls?

Illustration without a description Illustration without a description

Every drag-and-drop action should have a method that does not require holding and moving a pointer along a path, unless dragging is essential to the activity. The alternative must complete the same outcome, not merely expose the draggable item to focus. WCAG 2.2 addresses both single-pointer dragging and keyboard access.

 

Choose an alternative that fits the task. Reorderable items can have Move up and Move down buttons. A kanban card can offer a Move action followed by a destination list. A file can be selected and assigned to a folder through menus. Sliders need keyboard commands, and map interfaces need searchable fields or directional controls for relevant functions.

 

A clear reorder pattern may provide:

 

  • a keyboard-focusable handle or item action menu;
  • Move up, Move down, Move to start and Move to end actions;
  • disabled states at the first and last positions;
  • a status message announcing the new position;
  • focus that stays on the moved item or its corresponding control.

 

Do not rely on deprecated drag-specific ARIA attributes as a complete solution. Use ordinary buttons and lists with accurate names, then update the DOM order and any position text after each move. Pointer dragging can remain as a convenience, but the non-drag method should be visible or readily discoverable rather than hidden in undocumented shortcuts.

 

Test with Tab, activation keys and screen-reader browse or focus modes. Verify movement in both directions, boundary states, undo and saving. A successful alternative lets users understand what is selected, choose the destination and confirm the result without reproducing a physical dragging gesture.