~/blog/accessible-animations.md
bijay@nepal:~/blog$ cat accessible-animations.md
Animations that respect your users
commit 3a00d7eAuthor: Bijay Shrestha1 min read
#a11y#css
Some people set their operating system to reduce motion because animation makes them feel unwell. The browser exposes that setting, so honour it.
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0s !important;
animation-iteration-count: 1 !important;
}
}For JavaScript-driven libraries like AOS, check the same media query before initialising, and play entrance animations only once so content doesn’t keep moving while people read.
EOF — thanks for reading. Questions? [email protected]