Skip to content

Tweak C39 and add new matching SCR40 #4404

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

patrickhlauke
Copy link
Member

@patrickhlauke patrickhlauke commented May 18, 2025

  • Tweak existing C39 to provide extended example, and improve the prose
  • Tweak 2.3.3 understanding
  • Create new SCR40 technique that checks prefers-reduced-motion via JavaScript
  • Add SCR40 to the changelogs

Closes #3931

Previews:

* wrap mention of `prefers-reduced-motion` in code tags
* improve explanation for C39
* add a defensive reduced motion use (checking for `no-preference`) example code
Copy link

netlify bot commented May 18, 2025

Deploy Preview for wcag2 ready!

Name Link
🔨 Latest commit 24a367f
🔍 Latest deploy log https://app.netlify.com/projects/wcag2/deploys/685ec867aae3650008b173b9
😎 Deploy Preview https://deploy-preview-4404--wcag2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Co-authored-by: Dan Bjorge <dan@dbjorge.net>
@@ -1,5 +1,6 @@
<ol>
<li><time datetime="2025-04-22">2 Jun 2025</time>: Added {{ "G226" | linkTechniques }}</li>
<li><time datetime="2025-06-02">2 Jun 2025</time>: Added {{ "G226" | linkTechniques }}</li>
<li><time datetime="2025-05-19">19 May 2025</time>: Added {{ "SCR40" | linkTechniques }}</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should update the 2 changelog files so SCR40 is the latest, and reflect when it's merged rather than when the PR was first written

(FWIW I have started working on a way to automate the entire Techniques Change Log; not sure which will get done first)

@@ -50,7 +58,7 @@ <h2>Tests</h2>
<h3>Procedure</h3>
<p>For each interactive element that moves due to a user interaction:</p>
<ol>
<li>Enable the 'Reduce Motion' setting in your system;</li>
<li>Enable the 'Reduced Motion' setting in your system;</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the reason this was quoted as 'Reduce Motion' might be because that's what the exact setting is called in Mac OS X.

However, each OS/DE has a completely different phrasing for the setting, so maybe we should rephrase this in a way that removes the quotation? (The resource links in Animation from Interactions should help people find the right setting in their particular environment.)

(This comment applies to both SCR40 and C39.)

<p>The understanding document for <a href="../../Understanding/motion-actuation.html#resources">Motion Actuation</a> includes links for changing the reduce motion setting.</p>
<p>Some users experience distraction or nausea from animated content. For example, if scrolling a page causes elements to move (other than the essential movement associated with scrolling the content, which is under the user's control) it can trigger vestibular disorders.</p>
<p>Media queries that selectively enable/disable CSS-driven animations based on operating system or user agent preferences allow users to prevent those symptoms.</p>
<p>The understanding document for <a href="../../Understanding/motion-actuation.html#resources">Motion Actuation</a> includes links for changing the 'Reduce Motion' setting.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you might've meant to link to Animation from Interactions (i.e. the one also included in this PR); the resource links in Motion Actuation seem less relevant.

(This comment applies to both SCR40 and C39.)

<ol>
<li>Enable the 'Reduced Motion' setting in your system;</li>
<li>Check that the motion is not essential;</li>
<li>Check that the element does not move.</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little curious about this phrasing (which I realize is identical to C39).

I'm concerned this could be misinterpreted too strictly? i.e. if the "movement" is associated with new content appearing, or content being relocated, the content can still appear or relocate instantaneously rather than gradually via an animation, right?

If you think I'm overthinking this and it should be fine given the context of the rest of the page, feel free to ignore.

(This comment applies to both SCR40 and C39.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide JavaScript example of code for detecting prefers-reduced-motion
3 participants