material-components / material-components/material-web

Implement animation tokens for more control

Open
#3,712 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SCSS
Stars
11.3k
Forks
1.1k
Avg merge
20h 28m
Merged PRs (30d)
13

Description

In view of https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions.html, would it be possible to provide more/better control over MD components animation?

For instance, would it be possible to express all animation duration as a css variable so as to contol it over a @media (prefers-reduced-motion: reduce) global statement (inspired for example by https://www.silvestar.codes/articles/using-css-variables-for-reduced-motion-on-a-global-scale/ or https://web.dev/learn/accessibility/motion/) ?

We are using this strategy with success at https:accessiblesurveys.com on our own components. For the time being, we override all MD components for which we need to control animation behaviors.

It would be simpler to provide this by default for the release of the next MD spec (MD3).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Review the animation durations across the MD components and the linked WCAG and reduced-motion guidance first; done means animation behavior can be controlled consistently through CSS variables and reduced-motion preferences without component-specific overrides.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, scss
Domain
accessibility, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.