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.
Manual only No automated check says anything useful.
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
- Manual only
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>
Manual only
How far an automated check gets
Nothing automatic decides this. A scanner that reports it as passing is reporting that it did not look. It stays untested until a person tests it and records what they did — which is exactly how we treat it: as untested, not as passed.
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.