Accessibility Certified – Home

2.5.4 Motion Actuation

Functions triggered by moving the device or by gestures in front of a camera need an on-screen alternative and a way to switch motion off.

Level APrinciple 2: Operable

What does it mean?

Some sites and web apps react to device motion: shaking the phone to undo, tilting it to scroll, or moving in front of a camera. People with motor impairments may not be able to make these movements, and people whose device is mounted on a wheelchair may trigger them by accident.

Every function operated by motion must also be possible through normal user interface components such as buttons, and users must be able to turn off the reaction to motion to prevent accidental triggering. Exceptions: motion used through an accessibility-supported interface, and cases where the motion is essential, such as a step counter.

Who does it help?

  • People who cannot hold or move a device, or have it mounted in a fixed position
  • People with tremors who might trigger motion functions by accident
  • People who cannot make specific gestures in front of a camera

Common failures

  • A "shake to undo" or "shake to report a problem" function with no button alternative
  • A game or form that advances by tilting the device only
  • A motion feature that cannot be switched off in the settings

How we test it

  • people only Manual only: nothing useful can be measured. The reviewer tests it directly.

Test question: Functions triggered by shaking or tilting have a UI alternative and can be switched off.

A person decides every criterion. No criterion ever passes automatically.

How to fix it

Problem
window.addEventListener('devicemotion', (e) => {
  if (isShake(e)) undo();
});
Better
<button type="button" id="undo">Undo</button>
<label><input type="checkbox" id="shake"> Allow shake to undo</label>

<script type="module">
  document.getElementById('undo').addEventListener('click', undo);
  window.addEventListener('devicemotion', (e) => {
    if (document.getElementById('shake').checked && isShake(e)) undo();
  });
</script>

Undo now has a button, and shaking only works if the user has turned it on.

Practical tips

  • Default motion features to off when they can trigger irreversible actions.

Official source

Understanding WCAG 2.2 at the W3C: 2.5.4 Motion Actuation

How does your website do on this criterion?

The free check tests your home page automatically; the audit decides all 55 criteria.

Free checkAll criteria