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.
Shake to undo, and no other way.
Unavailable to a mounted device, and constantly triggered by an involuntary one. The same gesture is both impossible and unavoidable, depending on the body.
A button too, and a setting to disable the gesture.
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.
- 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.
- Open the page on a phone or tablet and try each movement, to confirm which functions respond.
- For each one, find a button or another control on screen that does the same thing. Check that it works without moving the device.
- Look for a setting that turns off the response to motion, and turn it off.
- Shake and tilt the device again. Check that nothing happens.
- 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
- Goal. Let someone undo without shaking the phone, and stop a shake from undoing.
- 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.
- 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.
- 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.
2.5.4 fails
Also in guideline 2.5
Criteria in the same guideline often fail together.
- 2.5.1, OperableLevel A
Pointer Gestures
Fails when: Zooming is gesture-only.
- 2.5.2, OperableLevel A
Pointer Cancellation
Fails when: Deleting fires the moment the pointer goes down.
- 2.5.3, OperableLevel A
Label in Name
Fails when: The visible text and the accessible name disagree.
- 2.5.7, OperableNew in 2.2Level AA
Dragging Movements
Fails when: Reordering works by drag and drop only.
- 2.5.8, OperableNew in 2.2Level AA
Target Size (Minimum)
Fails when: Sixteen-pixel icons, packed edge to edge.