Animation from Interactions
What this means
Some user interactions, like scrolling, hovering, or clicking, trigger a motion animation. This could be a parallax effect or an element sliding, zooming, or spinning into view. When that happens, there needs to be a way to turn the animation off. The exception is when the motion itself is essential to what's being communicated, or to the function of the feature. A video editing timeline is one example, where the animation is the actual content, not a decorative effect layered on top of it.
Who it affects
People with vestibular disorders can feel dizziness, nausea, or headaches from motion effects. Parallax scrolling and large zoom or slide transitions are common triggers, even without a rapid flash. People with attention-related disabilities can find animated transitions distracting too. This gets worse when the transitions show up often, as a side effect of ordinary scrolling. A setting to disable interaction-triggered animation lets these users browse in comfort, with full access to the content and the feature itself.
Code example
Bad
/* Parallax scroll effect with no way to disable it */
.parallax-section {
background-attachment: fixed;
transition: transform 0.3s ease-out;
}
.parallax-section.scrolled {
transform: translateY(-50px) scale(1.1);
}Good
/* The same effect, disabled automatically when the user has requested
reduced motion at the OS or browser level */
@media (prefers-reduced-motion: no-preference) {
.parallax-section {
background-attachment: fixed;
transition: transform 0.3s ease-out;
}
.parallax-section.scrolled {
transform: translateY(-50px) scale(1.1);
}
}
/* With reduced motion requested, the section keeps its static
background position and no transform is applied */How to test it
Interact with the page the way a typical user would. Scroll through it, hover over elements, click buttons and links. Note any motion effects that trigger as a result, such as parallax backgrounds, sliding panels, zooming images, or animated transitions. Then turn on your operating system's reduce-motion setting and repeat the same interactions. The animations should be much reduced or removed, unless that motion is essential to the content or the task.