Problem/Motivation
WCAG 2.1 introduces Success Criterion 2.3.3 Animation from Interactions, and using the prefers-reduced-motion
media query is recognized as a sufficient technique to address it. Notably, it's classed at level AAA, so it isn't a blocker for the Drupal core accessibility gate (which targets level AA). However it looks easy to address using the prefers-reduced-motion
media query, and being able to turn animations off has a very high value for affected users in several groups.
TODO: explain the problem better, background on vestibular disorders, etc. Also the difficulty of assessing high-risk vs low-risk for individual designs. Also benefits to users with some cognitive disabilities. Animations can be very unfriendly ("too loud") for people with autistic-spectrum disorders. People with attention difficulties can lose their focus when a notification grabs their attention.
TODO: WCAG SC 2.2.2 Pause, Stop, Hide (AA) is also relevant here, add explainers for that.
TODO: Is WCAG SC 2.3.1 Three Flashes or Below Threshold relevant here? If so, add explainers for that.
TODO: Do we want to disallow or at least discourage autoplay if prefers-reduced-motion is set to reduce?
A user preference in Windows, Android, macOS, iOS, and Windows (see #34) now have an OS-level user preference for turning animations off. Safari already implements the CSS5 prefers-reduced-motion
media query.
Many of the browsers supported by Drupal core have implemented the prefers-reduced-motion
media feature:
- prefers-reduced-motion support (caniuse.com)
- Firefox
- Chrome
- Opera
- Safari
- Edge (as of version 76, Chromium-based)
Browsers activate the prefers-reduced-motion
media feature based on OS-level user preferences:
- Windows 10: "Show animations in Windows"
- Windows 7: "Turn off all unnecessary animations (when possible)"
- Android (9+): "Remove animations"
- macOS, iOS: "Reduce motion"
Note that the name of the user preference varies by OS, and this sets user expectations. While the media query uses the term "reduce", most operating system UIs present it in a way that means "remove".
iOS 13 additionally implements Prefer Cross-Fade Transitions, which replaces menu slide-ins with cross fades, as a separate preference.
An article on the WebKit blog this summer, Responsive Design for Motion, breaks down different kinds of animation trigger for VIMS with video demonstrations of each one. This is the first easy guide I've seen about assessing animations. A demo page linked at the bottom of the article shows different ways to use the prefers-reduced-motion media query.
An article on A List Apart, Designing Safer Web Animation For Motion Sensitivity gives another good explanation of the issue. Warning: Two commenters on that article reports that they found the (stationary) illustration at the top of the article triggering as a simulation of the disorder. Also provides videos.
Proposed resolution
Form guidelines for developers and designers, about how to use the prefers-reduced-motion
media query effectively.
MOOD: optimistic - animations are actually welcome, as they can help users understand what buttons actually do, make notifications noticable, indicate that a component is busy, and a bunch of other nice design benefits. We aren't trying to hold designers back from using animation.
We can frame this as an achievable DESIGN CONSTRAINT: you can use animations to enhance usability/understanding, but designs should not RELY on animation to convey important information, and designs must be understandable/operable when animations are disabled. (This is following an established principle for use of colour; don't rely on colour alone to convey information/meaning.)
Remaining tasks
- Frame this as a policy which other contributors can follow.
- WCAG SC 2.3.3 "Animations from interactions" contains an exemption for animations which are deemed essential to understanding. We should address this in the policy, because sooner or later someone will try to claim that exemption. Such essential animations are expected to be very rare. Suggestion: using this exception should require explicit justification, followed by accessibility maintainer review + sign-off.
- A documentation page in the developer handbook.
- DONE. #2940012: Use prefers-reduced-motion media query on batch progress bar. The batch API progress bar would make a good proof-of-concept demo for this plan.
- The little progress "throbbers" used by AJAX autocomplete lookups, etc, present a distinct challenge, see comments #25-29. Ideally, find a throbber design which will work without any animation. Failing that, find a thobber design which will work without motionanimation. NEEDS CHILD ISSUE.
Core issues with animation (monitor these)
We don't have many animations in core (as of 8.4.0), but we are expecting some more animations in future. In particular, the design mockups from the outside-in initiative show several large animations framing the whole page. Open child issues to fix individual animations.
- #2940677: Support prefers-reduced-motion in off-canvas dialog. Off-canvas dialog has an animation where the tray slides in.
- Monitor the designs from various other core plans, in particular JS/Admin-UX and other site-builder experience initiatives.
- The proposed Workspaces UI designs look like it could present a HIGH-RISK animation. They cover a large part of the screen, and use zooming and growing simultaneously.
- Update: the drop-down tray in Workspace UI re-uses the off-canvas dialog, so this part of the design will presumably be fixed by #2940677: Support prefers-reduced-motion in off-canvas dialog
- An update on the Workflow Initiative for Drupal 8.4/8.5
- #2732081: WI: Phase G2: Full-site preview with Workspace UI
- #2784921-32: Add Workspaces experimental module
- #2279049: Add a CSS animation to expanding of details elements. There's an issue for adding animation to details/summary open + close.
- #2940023: [PP-1] Improve accessibility of Umami's responsive main menu. The mobile menu on Umami theme uses animation to open/close. The latest patch uses the media query to disable animation.
User interface changes
No design changes as such. Instead we propose to:
- Improve the current design implementations to follow an emerging accessibility practice, and respect OS-level accessibility settings.
- Recommend that new UI designs/themes are created in a such a way that they will work without relying on animation. Users should be still be able to understand and use the UI when animations are disabled.
Most users will see no change to the existing design, but users can turn off animations if they need to. This is a high-impact improvement for affected user groups.
API changes
None. We decided against introducing Drupal-specific API and user preferences, in favour designing our animations to respect CSS prefers-reduced-motion
media query.
Data model changes
None.
Original report
See #2316205-72: Provide a way to disable animations for a11y. That issue tried introducing an animation preferences API to Drupal, but we eventually decided upon supporting OS/platform-level preferences via the new CSS prefers-reduced-motion
media query.
Comments
Comment #2
nod_Comment #3
nod_Comment #4
nod_Comment #5
nod_Comment #6
nod_Comment #7
Charles BelovAdded Windows 7 and up as having a reduced-motion preference.
Comment #8
Charles BelovJust noting from an experience today with a new interface that even very brief (sub-second) animations can set me off if they take up a sufficiently large portion of the screen (in this case, about 50% but it was the 50% in the middle and which I was focusing on).
Comment #9
Ivan Berezhnov CreditAttribution: Ivan Berezhnov as a volunteer and at Drupal Ukraine Community for Levi9 commentedComment #10
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedThanks for tagging this issue for your sprint in Ukraine, Ivan. I'll be taking part in the Global Sprint weekend too, working at the Leeds, UK meeting. I'll be reviewing & mentoring with accessibility issues, and will be available via the Drupal Slack #accessibility channel.
The idea here is to build guidelines, as a [policy,no patch] issue. I've updated the issue summary to clarify this.
If you'd prefer to dive into CSS code, you could work on the animations in the Batch API progress bars, or the Settings Tray module. Please open child issues for those - I've included placeholders in the remaining tasks section.
Comment #11
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedWe still need to update the issue summary to describe the problem better. It would be a good idea to look back over the previous issue #2316205: Provide a way to disable animations for a11y for relevant points we want to keep.
Comment #12
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedThe core ideas/plan queue is the appropriate place for this just now.
Comment #13
John Cook CreditAttribution: John Cook at Creode commentedComment #14
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedComment #15
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedComment #16
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedComment #17
tedbow#2940677: Support prefers-reduced-motion in off-canvas dialog created
Comment #18
John Cook CreditAttribution: John Cook at Creode commentedI've changed the example in the summary to use the more verbose
prefers-reduced-motion: reduce
.This matches what has been done in #2940012: Use prefers-reduced-motion media query on batch progress bar and is clearer on what is being checked.
Comment #19
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedFleshing out he summary - links to related issues, a few more todo items.
Comment #20
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedComment #21
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedIn #2940012: Use prefers-reduced-motion media query on batch progress bar, @John Cook noticed that Opera is a bit fussy about
transition: none
, and seems to need-o-transition: all 0 none
ortransition-duration: 0s;
.Details in this StackOverflow page: https://stackoverflow.com/questions/6634470/disable-turn-off-inherited-c...
Adding this potential WTF to the issue summary.
Comment #22
mgiffordJust adding this new link to this topic https://hugogiraudel.com/2018/03/19/implementing-a-reduced-motion-mode/
Comment #23
DuaelFrI've found in some a11y best practices around the web that this could be handled globally as follow (vendor prefixes to be added):
I think we should think about getting this code in Core to send a strong message about these issues AND avoid to fix all animations and transitions of Core one by one.
Comment #24
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedThanks @DuaelFr - that's a really exciting idea. I like part about "sending a strong message about these issues".
I grabbed this from our chat in #accessibility channel on Drupal Slack today (slightly edited.)
Comment #25
Charles BelovThrobbers don't make me sick but they distract me. I'd really prefer no animation.
If someone is telling you they don't want animation (through the setting), the best practice would be to not have any. The old-school stationary word "Loading..." is sufficient.
Comment #26
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedIt's confusing that the media query, and settings in the UI, called it "reduce motion". That's different from "kill all animation".
I'm also strongly in favour of treating reduce-motion as no animations at all, as a policy. It's just easier if we don't have to triage them as high or low risk, which would lead to bikeshedding.
Comment #27
Charles BelovI'm guessing the wording came from iOS and macOS, where, at Settings > General > Accessibility for iOS and System Preferences > Accessibility > Display for macOS, the setting label reads "Reduce Motion." About the reduce motion setting, Apple Human Interface Guidelines reads:
On the PC, where, alas, no browsers yet support it, at Control Panel > Ease of Access Center > Make the computer easier to see, the setting label reads "Turn off all unneccessary animations (when possible)" which is much clearer.
That said, the throbber, over and above being an unneccessary animation, comes under the category of animations (potentially) lasting longer than 5 seconds. Animations longer than 5 seconds are supposed to, under WCAG 2.0 AA, have a pause button. That would be odd for a throbber, so it would be better to just not animate it as an unneccessary animation if Reduce Motion or Turn off all unneccessary animations is enabled.
Comment #28
effulgentsia CreditAttribution: effulgentsia at Acquia commentedIn general, huge +1 to this issue. Looks like the selector is already supported by Firefox 63 nightlies for Windows and may come to Firefox for Mac soon after. As far as I know, I don't have VIMS, but I personally dislike most web animations, so I may well switch from Chrome to Firefox in order to improve my web browsing experience via this setting.
https://www.w3.org/TR/WCAG21/#dfn-motion-animation distinguishes motion animation from non-motion animations:
Therefore, do we want "prefers-reduced-motion" queries to remove only motion animations, but leave in-tact color, blur, and opacity animations? In which case, do we want a loading throbber animation that only animates those properties?
I understand that some people dislike all animations, but is the scope of this issue to cater to that preference, or to respect the fact that the selector is named "prefers-reduced-motion" rather than "prefers-zero-animation"?
Comment #29
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commented@effulgentsia - Thanks for the update about Firefox implementation.
Good idea, that's worth a child issue for sure! This could be something we do in the new Admin UI (replacing the Seven theme). Over in one of the Admin UI planning issues, I suggested that if the new theme targets WCAG 2.1, then we might not need to commit to addressing all the new WCAG 2.1 Success Criteria in Seven. The current thobber is in core/misc, so I wouldn't expect to be able to change that before D9. However: bonus points if a new throbber in Admin UI also takes Bartik/Seven into account.
Animations from Interactions is level AAA, and the thobbers might be classed as "essential" for an exemption. This is still worth doing though. We can also consider the WCAG 2.0 "Pause, Stop, Hide" at level-A - In the case of busy throbbers, they have an indefinite duration. Especially in the case of AJAX autocompletes, etc., they could easily go over the 5 seconds for this criteria. But here again, they arguably get the "essential" exemption. I like Charles's about a stationary "loading" word, so the indicator doesn't solely rely on animation to convey what's happening.
Now, it would still be possible to create motion animations using just those properties. For instance, the classic radial-spokes thobber designs work by fading individual lines in and out, in sequence, which adds up to an effect like spinning clock hands.
Mmm, I keep swaying from one side of the fence to the other on this point. For me it hinges on how we assess them; it's not clear to me where (or if...) we can draw a threshold for high-risk vs. low-risk animations. (I think that's how "Animations from Interactions" ended up being demoted from level-AA to to level-AAA during the WCAG 2.1 Working Drafts.) The zero-animation outlook removes this tricky judgment call, makes triage easier, and provides a clear design constraint.
Comment #30
Charles BelovThe Windows 10 preference simply states "Show animation in Windows" (yes/no). So that would imply No=Don't animate at all.
Comment #31
Charles BelovSplit the Firefox issue link into two links to reflect Bugzilla bifurcation of the issue by operating system.
Comment #32
Charles BelovNoted impending availability of the media query in Firefox 63 for October 23, 2018.
Comment #33
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedRe: #30 - thanks Charles, that's a really useful point. So, we should consider that the phrasing on the OS preferences UI sets user expectations.
I'm excited to try the firefox nightly now.
Meanwhile, I found the upstream issue to implement it on Firefox for Android too.
Comment #34
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedI tried the Firefox Nightly 63-alpha1 with Windows 10, and saw it working!
I confirmed it was working with:
As Charles reports, the media query is tied to the OS-level "Show animations in Windows" user setting. They have different names depending on which version of Windows it is:
Comment #35
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedStarted re-organizing the issue summary.
This is moving along well. The progress on browser implementation is encouraging, and WCAG 2.1 is finalized. The batch progress bar has been fixed as a proof-of-concept, and we have other insights about throbbers, catch-all CSS rules, and guiding design principles. Plus a should-resolve question over the reduce-motion vs kill-all-motion approach.
We're at the stage where we can turn this into a policy, which other contributors can follow. So the next step is to tidy this up, so we can present it as something which is workable and justified.
The throbber design is definitely worth a child issue - @Charles would you like to start that off, perhaps? I think the JS + Admin UI initiative team would appreciate a clear statement of that problem.
Comment #36
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedComment #37
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedAndroid 9 introduces an OS accessibility preference called "Remove animations". Perhaps Firefox for Android will tie the media query to that? We'll learn soon enough.
Source: Android 9.0 Pie accessibility hands-on, and lots of other articles. It's getting mentioned in quite a lot of those "10 hidden features in Android 9" hype articles.
Comment #38
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedre: the throbber, just adding a related issue so we don't lose it
Comment #39
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedI took part in a design call today with the #admin-ui initiative, for the new design system and admin theme refresh. We talked about having a busy/loading indicator with a fallback for prefers-reduced motion!
One idea was for an autocomplete ajax text box. It would have a rotating icon inside the textbox, and a "Loading..." message would appear as small text just outside the text box. With prefers-reduced-motion, the icon animation would be killed, and just the stationary "Loading..." message would appear.
Comment #40
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedprefers-reduced-motion
has apparently landed in Firefox for Android now, and will ship with v64 in December 2018, according to Firefox 64 for developers release notes. I'm not clear if it requires the new "remove animations" OS-level accessibility setting in Android 9? (I couldn't make it work in Android 8.)It also landed in Firefox for Mac in v63, according to Firefox 63 for developers release notes.
Comment #41
mgiffordI dropped by the Mozilla offices in Toronto this week & had a great chat with some of their accessibility folks. Pretty sure VIMS came up. Happy that prefers-reduced-motion has landed in FF.
Thanks for the update @andrewmacpherson
Comment #42
mgiffordJust adding this link about toggling animations:
https://www.kirupa.com/html5/toggling_animations_on_off.htm
Comment #43
effulgentsia CreditAttribution: effulgentsia at Acquia commentedAccording to #30 / #34, Windows 10 labels the setting "Show animations in Windows".
According to #40, Android 9 labels the setting "remove animations".
Yet the link in #42 says:
And https://webkit.org/blog/7551/responsive-design-for-motion/ has more info on that as well.
So I'm eager to see how this all gets synthesized into recommendations for Drupal.
Comment #44
Charles BelovFor clarification, animation sensitivity isn't just about VIMS. It can also be about hypervigilance or, for that matter, preserving battery life.
Comment #45
Charles BelovAs of January 9, 2019, Chrome has committed to implementing and shipping this feature.
blink-dev › Intent to Implement and Ship: CSS prefers-reduced-motion media query
Chrome Platform Status > CSS prefers-reduced-motion media query
Issue >Add support for CSS prefers-reduced-motion media feature
Comment #46
Charles BelovI made a couple of updates to the issue discussion.
In the Todo, I raised the question of whether animations triggered by cursor movement could inadvertently trigger epileptic seizures by producing flashing within the rate specified by WCAG 2.0 Guideline 2.3 Seizures: Do not design content in a way that is known to cause seizures. I add this because I was recently presented with a design which involved multiple color-inverting flipping tiles on hover. Given sufficiently fast cursor movement, this could result in more than three flashes per second.
I added a link to a second reference article, from A List Apart, as discussion of vestibular disorder.
As a comment on the Webkit article, they recommend only removing animation if it is known to trigger vestibular disorder. I disagree, in that, as noted, other disorders can be triggered as well, and most people would not have the expertise to know whether a particular animation would trigger someone.
Comment #47
mgiffordFollowing up on @Charles Belov's post. Looks like Google's Chrome will have this enabled by default in release 74:
https://developers.google.com/web/updates/2019/03/prefers-reduced-motion
Comment #48
Charles BelovChrome 74 has been released. I've confirmed with the Webkit prefer-reduced-motion demo that prefers-reduced-motion is supported.
Comment #49
Charles BelovCorrected typo "loose" for "lose"
Comment #50
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedThe only outstanding question here is about treating "reduce" as "remove/turn off". We've been back and forth on this a lot.
To my mind, the overriding factor is that the majority-share OS (Windows and Android) convey it as "remove". However, it occurred to me to check what the CSS Media Queries level 5 working draft actually says. Today I noticed this definition (emphasis mine):
That wording seems to settle it. We've already seen how the OS-level preferences are phrased, so the expectation of the majority of users will be to remove (not reduce) animations. The wording of the CSS definition aligns with this too.
So, I propose we move this policy to the finishing line:
prefers-reduce-motion: reduce
as meaning "completely remove", per the CSS definition, and in harmony with how the user preference is actually called on most OS.I'll update the the issue summary so it reads like a policy.
This comment updates the sections on supported browsers and OS preferences. Most have implemented it now.
Comment #51
Charles BelovAdded note on iOS splitting out the preference for slide-in menus. I don't know whether macOS Catalina similarly implements a split-out preference, but, as they came out around the same time, I would not be surprised if this has been done. Given that this is not currently supported by any browser nor implemented in Windows, I suggest we focus on prefers-reduced-motion as the sole arbiter.
As for necessary animations, and I imagine there are some, those would need to respect Pause, Stop, Hide. I added a TODO on whether we want to disallow autoplay when prefers-reduced-motion is set to reduce. I know autoplay is an issue for me.
Comment #52
mherchelI would caution against completely removing the animations (as suggested in #23).
This would cause any
transitionend
andanimationend
events not to fire. I personally use these events for setting focus to a textfield after something slides in.A better way (assuming the decision is made to implement this) would be to use an "almost 0s" duration
That all being said, I strongly suggest that we read through this Mozilla github issue: https://github.com/mozdevs/cssremedy/issues/11
There's a ton of research done on this very question. Val Head (who is a very respected authority on web animations) added
Comment #53
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedThanks @mherchel.
I too have seen the approaches with 1ms duration, and the issue of whether transition events fire. I was meaning to raise this myself, which is why I haven't put the
transition: none
snippet into the issue summary yet.Thanks for the github issue. There's a lot of detail there. I have a few other bookmarks which cover this, but not in as much depth.
I've heard some reasonable uses for JS transition events, and if they don't fire because of
transition:none
I expect that would complicate a lot of JS. In particular, I've seen approaches which update dynamic ARIA properties ontransitionstart
.The 1ms approach sounds better based on what I've heard so far.
Comment #54
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedFrom the mozdevs/cssremedy Github issue mentioned by @mherchel in #52 ( What's best for prefers-reduced-motion?)
Yes, I'll buy that. The Github issue (particularly Val Head's comments) go into greater depth than I've ever considered. I'm not an animation designer, and some properties discussed there are beyond my present knowledge (e.g.
animation-fill-mode
). However, what @DuaelFr and myself are proposing is a safety-oriented baseline for common animation uses, not a single rule for all situations. Specific components could still over-ride this baseline.Also from the same Gitub issue, some quotes from our old friend Jen Simmons who is thinking along the same lines (emphasis mine)....
Jen Simmons was the original Bartik theme designer/maintainer, so she knows our situation well! (Heck, CSSRemedy sounds like the sort of library any major CMS might consider adopting wholesale, like we do with
normalize.css
).The main purpose of such a baseline in Drupal core themes (and hopefully contrib base themes and starter kits) is to safeguard against CSS animations in contrib/custom modules where the developer hasn't supported
prefers-reduced-motion
. For example, a contrib module might provide an alternative admin UI geared towards managing large taxonomy trees; with a progressive tree-disclosure widget which animates themax-height
when a deeper level is opened. Such a case would work fine with the sort of global baseline proposed here, and the module maintainer wouldn't have to do anything special.FWIW, Bootstrap went for
transition: none
, and consequently Joomla has that too:The Bootstrap issue queue gives some insight into how this was received among developers: Bootstrap issues containing "prefers-reduced-motion".
As each new browser implemented
prefers-reduced-motion
(first Safari, then Firefox), new bugs were filed to say some Bootstrap component was broken. In most cases it was deemed "by design", and developers had just run into the global baselineprefers-reduced-motion
for the first time.When we put a similar baseline into core Drupal themes, we might expect a similar run of issues in contrib modules. That's OK - I'd view it as an opportunity to raise awareness of the issue among developers and themers. Most users won't encounter it unless they have turned the OS preference on.
Note that core themes are marked as "internal" so this is fine for backwards-compatibility policy. I think it should be implemented directly in Bartik, Seven, Umami, and Claro, but NOT Classy because many live websites are using that. In any case there's a plan to remove Classy in D9.
Nonetheless, this policy warrants a change record and handbook page.
Comment #55
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commented@Charles Belov, re. #51:
Thanks for the note on iOS 13 "Prefer Cross-Fade Transitions". My iPod Touch isn't eligible for iOS 13 so I haven't seen that yet. However, does it actually have an effect on web content? Unless it's something that we can address in Drupal, then it's out of scope here.
SOME instances of WCAG "Pause, Stop, Hide" and "Three flashes" might be caught by the
prefers-reduced-motion
baseline we propose, but only if the animation is implemented using CSS animation/transition. My expectation is that most occurences of the these will come from content such as video, or custom JS slideshows etc. These are the sort of thing the baseline won't catch.We can certainly advise developers and authors about it in this policy and in the accessibility handbook pages. This policy issue title could be a bit more general, e.g. "Guidance on safe use of animation".
This might be possible, but I think it's going to hard to catch in a generic approach. Speculation:
matchMedia()
check forprefers-reduced-motion
, to turn the HTML autoplay attribute off. Perhaps explore this in a follow-up issue?Comment #56
Charles Belov@andrewmacpherson: Thank you for your detailed response.
Prefer Cross-Fade Transition replaces menu and dialog box slide-in with a fade transition. That menus and dialog box slide-ins were not previously included in Prefers Reduced Motion had been raised as a justification for not including all cosmetic animation under Prefers Reduced Motion. I'm not sure why Apple chose to break it out, but it is clear that it bothers enough people (myself included) that Apple chose to address it.
Prefer Cross-Fade Transition for menus/dialogues is not currently relevant to any browser implementations in any implementable way, so far as I know, so I'm not suggesting it be added to the scope. It was included more as an indicator of where the industry is heading in terms of best practices. Since we can't implement it, I suggest that we treat
prefers-reduced-motion: reduce
in Drupal as if it included an identical choice for Prefer Cross-Fade Transition.However, Prefer Cross-Fade Transition does point the way to a possible solution for dealing with not being able to fully disable transition through
transition:none
. That is, where there must be some kind of transition, implementing it as a cross-fade rather than as motion.Comment #57
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedTreating "motion" separate from animation or transition is splitting hairs. The CSS definition talks about "movement or animation" in one breath, and the user preference name on Windows and Android refers to "animation" not motion. It's clear that the intention of the media query is to turn off animation in general.
Apple != "the industry".
There is also a prefers-reduced-transparency media query in the CSS draft too, but I don't think that's been implemented yet. An animated cross-fade could count as animation and transparency; I think you'd turn it off if either media query matched.
Comment #58
mgiffordTagging for accessibility.