Level
A
Since
WCAG 2.1
/ WCAG criterion

2.5.4 Motion Actuation

Anything triggered by shaking or tilting the device, or by a gesture at the camera, must also work with an ordinary control, and the response to motion must be possible to switch off.

/ What it requires

Phones and tablets have motion sensors, and a camera can read gestures. When content lets device motion, such as shaking or tilting, or user motion, such as a wave at the camera, operate a function, this criterion asks for two things. The same function must also be available through user interface components such as buttons. And responding to the motion must be possible to disable, so that it is not set off by accident. It protects people whose device is fixed to a wheelchair or a stand, people who cannot hold or move a device steadily, and people with tremors who would trigger it without meaning to.

Two exceptions apply. The motion is used to operate functionality through an accessibility supported interface, which also covers the incidental movement of typing, using a mouse or a touch screen, or operating assistive technology. Or the motion is essential for the function and replacing it would invalidate the activity, as with a pedometer counting steps. The criterion does not cover moving through space as recorded by geolocation or beacons, or pointing a camera at a QR code or a document. Supporting an operating system setting that turns motion detection off can meet the disable part.

/ How pages fail it

  • Shaking the phone undoes the last entry, and there is no undo button and no setting to switch shaking off.
  • A slider changes its value as the device is tilted, with no buttons for the same change and no way to stop the tilt from having an effect.
  • A 360 degree product photo turns only when the device is moved, and has no arrow controls.
  • A gallery moves to the next image when a hand is waved at the camera, and offers no next button.
  • Tilting a tablet turns the page of an e-book reader. Page buttons exist, but nothing stops an accidental tilt from turning the page.

/ How to check it yourself

  1. Search the scripts for devicemotion and deviceorientation listeners, the Accelerometer and Gyroscope sensor interfaces, and camera access through getUserMedia. They show where the page may read motion.
  2. On a phone or tablet, shake, tilt and turn the device on every page that uses them, and note what each motion does.
  3. For each function, find a button, link or other control that does the same thing without moving the device.
  4. Look for a setting in the page or the application that turns the motion response off, and check that the motion has no effect once it is off.
  5. Set aside motion that is essential to the activity, such as step counting, and the movement of pointing the camera at something to be recognised.

/ How to fix it

  • Give every function triggered by motion an ordinary control: an undo button beside the field, page buttons in the reader, arrow buttons on a 360 degree view.
  • Add a setting, remembered for the user, that stops the response to devicemotion and deviceorientation events, and remove the listeners while it is off.
  • Respect the operating system settings that let people turn motion features off, and do not work around them.
  • Start listening to motion sensors only after the person turns the feature on, rather than from page load.
  • Treat camera gestures the same way: a wave or a nod may be a shortcut, never the only way to move on.

/ What our scanner checks

This criterion has no automated check in our scan. The scan runs in a headless browser with no sensors to move, and none of its rules looks for devicemotion or deviceorientation listeners. HTML_CodeSniffer warns about an inline ondevicemotion attribute, but a warning is dropped like a notice, since the scan keeps errors only. In a manual audit the device is shaken and tilted and each alternative is tried.

/ Who fails it, in our own measurements

The weekly index has no figures for this criterion, because none of the checks the site scan runs can test it. A person judges it, which is what a manual audit is for.

One page per body, measured by automated checks on a weekly schedule. Any body that has fixed something since the last sweep will show it at the next one, and every entity page carries a right of reply.

/ Questions about this criterion

Does shake to undo fail WCAG?

Only if it stands alone. Shake to undo is allowed when the same undo is available through an ordinary control, such as a button, and when the shaking response can be turned off. W3C gives exactly this pairing, a shake gesture plus a button beside the field, as an example that meets the criterion.

Does 2.5.4 cover screen orientation or geolocation?

No. The criterion is about motion used as deliberate input, such as shaking, tilting or gesturing at a camera. It does not cover a person moving through space as recorded by geolocation or beacons. Content locked to portrait or landscape is a separate question, handled by 1.3.4 Orientation.

When is motion actuation allowed without an alternative?

When the motion is essential and replacing it would invalidate the activity, as with a pedometer that counts steps, or when the motion operates functionality through an accessibility supported interface. Outside those exceptions, motion may be offered as one way to act, never as the only way, and it must be possible to switch off.