WCAG Encyclopedia

2.5.4 · OperableLevel A

Motion Actuation

If moving the device does something — shake to undo, tilt to steer — there has to be a normal control that does it too, and a way to switch the motion trigger off. Someone whose phone is mounted to a wheelchair cannot shake it; someone with a tremor shakes it constantly.

Principle
Operable
Guideline
2.5
Level
A
In WCAG since
2.1
Number
2.5.4

Broken, then fixed

The same interface twice: first with the mistake, then with the smallest change that fixes it.

Broken: Shake to undo, and no other way.
Shake to undoNo undo button anywhere in the interface.

Unavailable to a mounted device, and constantly triggered by an involuntary one. The same gesture is both impossible and unavoidable, depending on the body.

Fixed: A button too, and a setting to disable the gesture.
Undo↺ UndoShake to undo: off

Both halves are required: an equivalent control, and the ability to turn the motion trigger off.

How to test

Check your own interface against 2.5.4, one step at a time.

  1. List every function the page runs from device motion or from gestures picked up by a camera: shake to undo, tilt to scroll, wave to go to the next page.
  2. Open the page on a phone or tablet and try each movement, to confirm which functions respond.
  3. For each one, find a button or another control on screen that does the same thing. Check that it works without moving the device.
  4. Look for a setting that turns off the response to motion, and turn it off.
  5. Shake and tilt the device again. Check that nothing happens.
  6. For any function left without both, check that the motion is essential to it, as counting steps is for a pedometer.

Common questions

Does shake to undo fail 2.5.4?

Only when it is the only way to undo or cannot be turned off. Give an undo button on screen, and a setting that stops shaking from doing anything.

Does 2.5.4 cover gestures picked up by a camera?

Yes, when a gesture of the hand, face or eyes is the input. Pointing the camera at a QR code or a document is not a gesture, so it is outside 2.5.4.

Does a game controlled by tilting the device fail 2.5.4?

Only when tilting is not essential to the game. Where the game exists to be steered by tilting, the motion is essential and is exempt. Where it is one way to move among others, it needs an on-screen control and a way to turn it off.

Try it yourself

A lab is a small working piece of interface that you change yourself. Read its steps, use the controls under it, and watch the verdict line at the bottom: it says whether the criterion passes or fails as you go. Reset puts it back.

Try it: shake to undo

How to use this lab

  1. Goal. Let someone undo without shaking the phone, and stop a shake from undoing.
  2. The controls. The options under “Undo button” show or hide an Undo button on the mock phone. The options under “Shake to undo” pick Always on, On, with a setting to turn it off, or Turned off in settings. The Shake the phone button acts out a shake.
  3. Try this. The lab starts with no Undo button and shake always on, which fails. Press Shake the phone. Then pick An Undo button and On, with a setting to turn it off, and try Turned off in settings too.
  4. What it means. 2.5.4 passes only with an Undo button and a way to turn shake to undo off. Without both, 2.5.4 fails: people who can’t shake a phone, or whose phone is fixed to a wheelchair, can’t undo, and people with tremors undo by accident. The verdict line under the lab says which.
Undo button
Shake to undo
Not shaken yet

2.5.4 fails

Also in guideline 2.5

Criteria in the same guideline often fail together.