Opened 4 years ago
Closed 2 years ago
#54852 closed enhancement (wontfix)
Twenty Twenty: Consider less aggressive motion preference styles
| Reported by: | sabernhardt | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Bundled Theme | Version: | |
| Severity: | normal | Keywords: | needs-patch close 2nd-opinion |
| Cc: | Focuses: | accessibility, css |
Description
Twenty Twenty styles create animations and transitions but then disable all that animation for people who set the reduced motion preference in their browser/OS.
@media ( prefers-reduced-motion: reduce ) {
* {
animation-duration: 0s !important;
transition-duration: 0s !important;
}
}
The theme needs to continue honoring the preference, but it could define each of its animations within a (prefers-reduced-motion: no-preference) media query—and remove the 0s !important styles—instead. That way, the theme would be responsible for its own motion without disabling motion from other stylesheets (from plugins).
Related: #54174 (Twenty Twenty-One)
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This feature is implemented as a media query, it can be accessed the same way we access any media query values in JS: using window.matchMedia.
function getPrefersReducedMotion() {
}