Skip to content

WCAG 2.3.3 - Disabling animation #7842

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
1 of 17 tasks
calebfoss opened this issue May 23, 2025 · 0 comments
Open
1 of 17 tasks

WCAG 2.3.3 - Disabling animation #7842

calebfoss opened this issue May 23, 2025 · 0 comments
Labels
Milestone

Comments

@calebfoss
Copy link
Contributor

Increasing access

This would help p5 creators to follow WCAG 2.3.3 by default.

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

Feature request details

This is a sub-issue of #6992

From #6992

WCAG 2.3.3 specifies that "Motion animation triggered by interaction can be disabled, unless the animation is essential to the functionality or the information being conveyed."

I would propose that, by default, p5 create an HTML element that acts as a pause/play button for the sketch, connected to loop()/noLoop(). This behavior could be disabled or reenabled with methods called something like noPause() and allowPause() respectively.

@ksen0 writes

[open for discussion] Disabling Animation - I'm not totally clear on the scope of work here but if the outcome is that there's a html component over the canvas that allows turning off animation (and respects prefers-reduced-motion? Or is that scope creep?) that seems great to work toward

@calebfoss writes

Good point about prefers-reduced-motion, but my take is that starting paused as a default, regardless of prefers-reduced-motion, would keep the implementation simpler and not rely on the page visitor having marked that setting on their device. Bonus benefits of this beyond accessibility would be that the play button could also switch focus to the canvas element and/or initialize audio contexts, allowing keyboard input and audio playback as soon as the button is pressed.

@calebfoss calebfoss added Feature Request Area:Accessibility Supporting web accessibility (a11y) labels May 23, 2025
@ksen0 ksen0 moved this to Open for Discussion in p5.js 2.x 🌱🌳 May 26, 2025
@ksen0 ksen0 added this to the 2.x Anytime milestone Jun 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Open for Discussion
Development

No branches or pull requests

2 participants