Skip to content

Remove prefers-reduced-motion file #128

@Antonio-Laguna

Description

@Antonio-Laguna

Is your enhancement related to a problem? Please describe.

I think this file should probably be removed from the scaffold:

/*
 * Resources on prefers-reduced-motion:
 * https://webkit.org/blog-files/prefers-reduced-motion/prm.htm
 * https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
 */
@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		animation-duration: 0.001s !important;
		transition-duration: 0.001s !important;
	}
}

I think this is using a very drastic approach and with very high specificity to just nuke animations which doesn't translate well with accessibility. The only concern with animations should be Vestibular disorders related to motion sickness. However, animations can be great too to combat forms of cognitive disabilities when used to break down complicated concepts or communicate relationships with seemingly unrelated objects. Here's a good article about researched benefits of animations in general.

A much slower animation that adds movement could be a valid replacement or even sorting to fade in / fade out without moving.

See 10up/Engineering-Best-Practices#385 for a supporting explanation in our Engineering Best Practices.

I'm more than happy to open a PR but I'd rather discuss this as an issue.

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions