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

USWDS - Feature: Add support for prefers-reduced-motion to disable transitions #5256

Open
2 tasks done
aduth opened this issue Apr 27, 2023 · 2 comments
Open
2 tasks done
Labels
Affects: Accessibility 🟡 Relates to the accessibility of our components Type: Feature Request New functionality

Comments

@aduth
Copy link
Contributor

aduth commented Apr 27, 2023

Is your feature request related to a problem? Please describe.

Some users who experience distraction or nausea from animated content may specify system preferences to express their desire for reduced motion to eliminate inessential animation. The U.S. Web Design System should ideally respect this preference to disable transitions which are inessential (e.g. mobile menu flyout animation).

Describe the solution you'd like

When the @media (prefers-reduced-motion) media feature is present for a user, the USWDS $project-easing variable should effectively be set to 0.

Describe alternatives you've considered

No response

Additional context

Code of Conduct

@aduth aduth added Status: Triage We're triaging this issue and grooming if necessary Type: Feature Request New functionality labels Apr 27, 2023
@amyleadem amyleadem added the Affects: Accessibility 🟡 Relates to the accessibility of our components label Apr 27, 2023
@aduth
Copy link
Contributor Author

aduth commented Apr 27, 2023

A couple additional notes:

  • It may not be enough to just affect $project-easing, since there are some animations which don't use this (example)
  • One implementation option could be a global style which implements a reset, which would be easy, but could conflict with a site's own custom styles (though likely not in a way which would be unexpected for the end-user)
  • This can also be useful for integration testing environments to avoid issues where the test may otherwise need to wait for the animations to finish before proceeding (example in our project)

@brunerae brunerae removed the Status: Triage We're triaging this issue and grooming if necessary label May 4, 2023
@aduth
Copy link
Contributor Author

aduth commented May 10, 2023

Looks like #5067 would address the part of this affecting the mobile navigation menu (cc @jkjustjoshing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Accessibility 🟡 Relates to the accessibility of our components Type: Feature Request New functionality
Projects
Status: Needs refinement
Development

No branches or pull requests

3 participants