Description
Increasing access
This proposal aims to make p5.js more accessible and user-friendly, particularly for non-English speakers, by replacing the text-based "Loading" message with a simple loading animation.
Which types of changes would be made?
- Breaking change (Add-on libraries or sketches will work differently even if their code stays the same.)
- Systemic change (Many features or contributor workflows will be affected.)
- Overdue change (Modifications will be made that have been desirable for a long time.)
- Unsure (The community can help to determine the type of change.)
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)
What's the problem?
Currently, p5.js displays a text-based "Loading" message in the top-left corner of the page during the execution of the preload()
function. This approach is not very visually engaging and can be confusing for end-users who do not understand English or have visual impairments.
A p5.js coder can replace "Loading" with a custom animation. This is mentioned in the preload()
and the p5.js overview page but this option is still relatively hidden and not particularly beginner friendly. See this Coding Train tutorial on loading animations.
What's the solution?
Replace the text-based "Loading" message with a visual loading animation. This animation could be a simple, universally recognized loading indicator (e.g., spinning circle) that provides a visual cue to users that content is being loaded without relying on text. An animated loader also better conveys the fact that something is happening. We can use the afterPreload
lifecycle event to trigger hiding the loading animation. Possibly, the loading animation itself could be user-overridable via a preloadAnimation()
function.
Pros (updated based on community comments)
Accessibility: Enhances p5.js accessibility by providing a language-independent loading indicator.
User Experience: Improves the user experience with a more engaging and informative visual cue during load times.
Internationalization: Supports p5.js's goal of being globally accessible by removing language barriers in the loading process.
Visual identity: The default loading animation could be an opportunity to include subtle elements of the p5.js visual identity like the pink color.
Cons (updated based on community comments)
Intrusivity: Depending on its design, the loading animation may be perceived as intrusive. We can mitigate this by making it easy to change the animation or deactivate it, and add examples on the preload()
reference page.
Proposal status
Under review
Metadata
Metadata
Assignees
Type
Projects
Status