spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

[Bug][a11y]: Coachmark subtle animation should support prefers-reduced-motion media query

Open majornista opened this issue 1 year ago • 3 comments

Code of conduct

  • [X] I agree to follow this project's code of conduct.

Impacted component(s)

Coachmark

Expected behavior

Coachmark elements should not continue to animate when the user has prefers-reduced-motion as an operating system or browser setting.

Additional context:

  • https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions
  • https://www.w3.org/WAI/WCAG21/Techniques/css/C39

Actual behavior

Coachmark continues to animate subtly despite the prefers-reduced-motion user preference.

The StoryDecorator contains some code to Reduce motion, but this is based on a [reduce-motion] attribute applied to the sp-theme element rather than respecting the prefers-reduced-motion media query.

https://github.com/adobe/spectrum-web-components/blob/7435e7fc7b66a9f4332bb6498ac9c423384f57ac/projects/story-decorator/src/StoryDecorator.ts#L152-L154

Relevant issue filed with Spectrum-CSS: https://github.com/adobe/spectrum-css/issues/1952

Screenshots

No response

What browsers are you seeing the problem in?

No response

How can we reproduce this issue?

Steps to reproduce

  1. Using Chrome, go to https://opensource.adobe.com/spectrum-web-components/components/coachmark/
  2. Open Developer Tools > Rendering
  3. Under Emulate CSS media feature prefers-reduced-motion, select "prefers-reduced-motion: reduce"
  4. Screen shot of Developer Tools > Rendering panel with Emulate CSS media feature prefers-reduced-motion picker
Screen shot of  Developer Tools > Rendering panel with Emulate CSS media feature prefers-reduced-motion picker

Sample code that illustrates the problem

No response

Logs taken while reproducing problem

No response

majornista avatar Jun 20 '23 21:06 majornista

@pfulton what are you thoughts on adding support for this media query at the Spectrum CSS level?

Westbrook avatar Jun 22 '23 13:06 Westbrook

@Westbrook We're migrating Coach Mark as we speak, so this is one of the things on @jenndiaz's list to tackle with that work

pfulton avatar Jun 22 '23 13:06 pfulton

Related to #3666

najikahalsema avatar Oct 05 '23 15:10 najikahalsema

Closed by https://github.com/adobe/spectrum-web-components/issues/3666

Westbrook avatar Mar 04 '24 19:03 Westbrook