Level A · WCAG 2.1
2.5.4 Motion Actuation
Anything done by shaking or tilting the device can also be done with an ordinary control, and the motion response can be switched off.
Partly automated Some failures are detectable, others need judgement.
How it fails in practice
“Shake to undo” with no undo button. A product viewer you can only turn by tilting the phone. A tremor, or a phone mounted on a wheelchair, fires the action nobody asked for.
How to fix it
Put a button next to every motion feature, and a setting that turns the motion response off. Keep the gesture if people like it — just do not let it be the only way or impossible to stop.
At a glance
- Level
- Level A — the minimum. Failing one of these usually makes something impossible rather than merely hard.
- Principle
- Operable
- Guideline
- 2.5 Input Modalities
- Added in
- WCAG 2.1
- EN 301 549
- 9.2.5.4
- Automated check
- Partly automated
How to test it by hand
- On a phone, shake and tilt the device on every page that might react: a product viewer, a game, a form with an undo.
- For each thing that responds, find a button or control that does the same without moving the device.
- Look for a way to switch the motion response off, and check it holds: shaking afterwards does nothing.
In code
<script>
window.addEventListener('devicemotion', (event) => {
if (isShake(event)) undoLastChange()
})
</script>
<button type="button" onclick="undoLastChange()">Undo</button>
<label><input type="checkbox" id="shake-to-undo"> Shake to undo</label>
<script>
window.addEventListener('devicemotion', (event) => {
if (document.getElementById('shake-to-undo').checked && isShake(event)) undoLastChange()
})
</script>
Partly automated
How far an automated check gets
A tool finds some failures here and cannot see the rest. A clean automated result means the checks that exist found nothing — not that the criterion is met. This is the gap that makes a green scan look like an accessible site, and it is where the keyboard agent, the agents still in development and a human reviewer do the remaining work.
Related criteria
Other criteria under the same guideline.
Find out which criteria your site fails
We scan up to 100 pages against WCAG 2.2 AA, send the keyboard agent through the page you name and email you the report — free, once, no strings.