Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force media background videos to respect "Reduced Motion" browser/system preference #162

Open
cjg89 opened this issue Oct 9, 2019 · 0 comments
Assignees
Labels
accessibility Related to an accessibility problem or potential improvement enhancement
Milestone

Comments

@cjg89
Copy link
Member

cjg89 commented Oct 9, 2019

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

@cjg89 cjg89 added enhancement accessibility Related to an accessibility problem or potential improvement labels Oct 9, 2019
@cjg89 cjg89 added this to the backlog milestone Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Related to an accessibility problem or potential improvement enhancement
Projects
None yet
Development

No branches or pull requests

4 participants