Skip to content

ACT-007b Tell assistive technology what each step of a keyboard move did

Level
Guideline, our choice
Verdict
Insufficient evidence (0 of 3 judges spoke)
Status
proposed, version 1.0.1

Rule

When an item can be moved with the keyboard, tell assistive technology in words when it is picked up, where it is after each step, and where it was dropped or that the move was cancelled, using its visible label and positions such as "2 of 5".

Examples

Live examples built with Justified's components. Try them with the mouse, the keyboard or a screen reader.

Do: Labels and positions at every step

Reading list

Space picks up and drops the item, the up and down arrow keys move it, Escape cancels.

  • Middlemarch
  • Persuasion
  • The Hobbit
  • Dracula
  • Rebecca
  • Emma

Tab to Reorder The Hobbit, press Space, then the arrow keys, then Space again. The box shows what the live region says: the title and its place, such as "position 2 of 6". Press Escape instead of Space and it says where the book is back. Focus stays on the handle after the drop. This is a guideline, our own choice.

Do: On a board, the column too

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
  • Add search
  • Fix login bug
  • Review the copy
  • Export report
Done
  • Check invoices
  • Write release notes

Pick up Fix login bug and press the down arrow a few times. It walks through every column, and each step names the card, the column and the place: "Fix login bug, Done, 1 of 3". A drop with the pointer is announced the same way. This is a guideline, our own choice.

Don't: The library's default, which reads out ids

Reading list

Space picks up and drops the item, the up and down arrow keys move it, Escape cancels.

  • Middlemarch
  • Persuasion
  • The Hobbit
  • Dracula
  • Rebecca
  • Emma

Pick up The Hobbit and press the down arrow. The region says "Draggable item b41e was moved over droppable area r1": nothing a person can use. The keys work, and the words only say an id.

Don't: Positions counted from zero

Reading list

Space picks up and drops the item, the up and down arrow keys move it, Escape cancels.

  • Middlemarch
  • Persuasion
  • The Hobbit
  • Dracula
  • Rebecca
  • Emma

Pick up Middlemarch. It is called "index 0", and the last of six books is "index 5". A reader who counts from one hears a place that does not match the list.

Why

KBD-001 makes sure a sortable list or a board can be rearranged with keys. For a person who cannot see the screen, that is only half the job: they press an arrow key and the row moves, but nothing tells them where it is now, so they cannot know when to stop. A few words at each step turn the keys into something they can steer. WCAG does not ask for this in every case. WCAG 2.2, 4.1.2 Name, Role, Value asks that the handle has a name and a role, not a running account of the move. 4.1.3 Status Messages applies when the product shows a line of text about the move, and then FBK-004 says how it is announced; a row that only shifts on screen is not a status message. 2.1.1 Keyboard requires the keyboard route itself, which is KBD-001.

Our reasons

None of the three judges speaks to telling assistive technology what a move did, so the verdict is Insufficient evidence (0 of 3 judges spoke) and this guideline is our choice. NN/g, an expert witness who does not vote, supports it. We ask for it for three reasons.

  • A keyboard route without words is a route only for sighted people. KBD-001 requires that the move works with keys. A screen reader user who cannot tell where the item is cannot finish the move, so the requirement does them little good.
  • The tools already do it, badly by default. dnd-kit speaks during a keyboard move out of the box, but it names items by their id. A sentence such as "Picked up draggable item 3f9a" is worse than silence. Writing the four messages takes a few lines.
  • It costs others nothing. The messages go to a live region that sighted people do not see.

Do

  • In dnd-kit, pass accessibility.announcements to DndContext with onDragStart, onDragOver, onDragEnd and onDragCancel. In a list Reading list: "Picked up The Hobbit, position 3 of 6", "The Hobbit, position 2 of 6", "Dropped The Hobbit at position 2 of 6".
  • On a board, name the column and the place in it: "Fix login bug, Done, 1 of 3".
  • On Escape, say the item is back: "Move cancelled. Fix login bug is back in In progress, 2 of 4".
  • Set screenReaderInstructions to say which keys pick up, move and drop. Our own choice, not part of the guideline: Space to pick up and drop, the arrow keys to move, Escape to cancel.
  • Give each handle a name, as 4.1.2 asks. Putting the item in it, such as "Reorder The Hobbit", is our own choice.
  • Keep the live region in the page before the first move, as FBK-004 says. dnd-kit does this for you; a region of your own must sit outside the list that re-renders.
  • Our own advice: after the drop, keep focus on the moved item's handle, even when the re-order renders the row again, so focus does not fall to the top of the page. That serves WCAG 2.2, 2.4.3 Focus Order. A move the server refuses after the drop goes back as STA-005a describes, focus included.
  • When the item is moved through the menu from ACT-007a, such as Move to Done, focus returns to the item and a short line "Moved to Done" is shown. That line is a status message, so FBK-004 applies.

Don't

  • Add KeyboardSensor and sortableKeyboardCoordinates and leave the default messages that read out ids.
  • Use aria-grabbed or aria-dropeffect. Both are deprecated and not supported by screen readers.
  • Write a message from a pointermove handler of your own, so the live region speaks at every pixel the item moves.
  • Give positions in pixels or as an index starting at zero.
  • Put the live region inside the sortable list, so it is rebuilt on every move and nothing is read.

Exceptions

  • Pointer drags. This guideline asks for words only for keyboard moves. dnd-kit writes its messages for pointer drags too, and that does no harm. The mark on the landing place is ACT-008.
  • A product that chooses otherwise. This is a guideline. A product that leaves it out still meets KBD-001 and, for any text it shows, FBK-004.

Verdict

Insufficient evidence (0 of 3 judges spoke). Only the judges decide; the expert witnesses are shown but do not vote. The judges do not settle this one, so it is a guideline: our own choice, with our reasons above. How verdicts work

Stances on ACT-007b
SourceRoleStancePage
WCAG 2.2LawSupports4.1.2 Name, Role, Value
WCAG 2.2LawSupports4.1.3 Status Messages
WCAG 2.2LawSupports2.1.1 Keyboard
Material DesignJudge No position
Apple Human Interface GuidelinesJudge No position
Carbon Design SystemJudge No position
GOV.UK Design SystemExpert witness No position
Nielsen Norman GroupExpert witness SupportsDrag–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, : Points to STA-005a for a keyboard move the server refuses after the drop.
  • 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