You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When initializing a new media background in the media background polyfill, add logic that detects the user's Reduced Motion preference, and pause the video + remove its autoplay capability.
Why it's Important
Excessive motion can be disorienting for certain users, and respecting the user's existing browsing preferences will improve their overall experience on sites using background videos.
Alternatives
n/a
Possible Implementation
Use window.matchMedia('(prefers-reduced-motion)'). See article from Viget below for an example snippet.
Description
When initializing a new media background in the media background polyfill, add logic that detects the user's Reduced Motion preference, and pause the video + remove its autoplay capability.
Why it's Important
Excessive motion can be disorienting for certain users, and respecting the user's existing browsing preferences will improve their overall experience on sites using background videos.
Alternatives
n/a
Possible Implementation
Use
window.matchMedia('(prefers-reduced-motion)')
. See article from Viget below for an example snippet.Additional context
More information:
https://www.viget.com/articles/best-practices-for-background-videos/
https://developers.google.com/web/updates/2019/03/prefers-reduced-motion
The text was updated successfully, but these errors were encountered: