Reducing motion with the picture element
bradfrost.com
Brad Frost:
I was just talking with Dave about the accessibility of moving images on the web, and he said:
hm… I wonder if you could use
picture
+prefers-reduced-motion
?He then sends the following code:
<picture> <source srcset="no-motion.jpg" media="(prefers-reduced-motion: reduce)"></source> <img srcset="animated.gif alt="brick wall"/> </picture>
Whoa! This is a revelation.