Motion Actuation
Anything triggered by moving the device, such as shaking to undo or tilting to scroll, can also be done through ordinary controls, and the motion trigger can be turned off.
Why it matters
A user whose phone is mounted to a wheelchair cannot shake it. A user with a tremor shakes it constantly and triggers the action by accident. Both need a button, and the second needs a way to switch the motion off.
Needs manual testing
Device-motion listeners are JavaScript and are not reported by any rule. Search the code for devicemotion and deviceorientation handlers and check each has an equivalent control and an off switch.
Fails
<script>
window.addEventListener("devicemotion", (e) => {
if (isShake(e)) undoLastAction();
});
</script>Undo exists only as a shake gesture. There is no button, and no way to disable the gesture for someone who triggers it accidentally.
Passes
<button type="button" onclick="undoLastAction()">Undo</button>
<label><input type="checkbox" id="shake-undo"> Shake to undo</label>
<script>
window.addEventListener("devicemotion", (e) => {
if (document.getElementById("shake-undo").checked && isShake(e)) undoLastAction();
});
</script>A visible Undo button does the job for everyone, and the shake gesture is opt-in.
Openwell finds violations like this one across your whole site, clusters them by the component that caused them, and generates a fix that's re-validated before you see it.
Scan your site free