Skip to content

Add the describe() function to live examples #312

Open
@SableRaf

Description

@SableRaf

Since p5.js has a convenient function to make sketches accessible to screen readers, it would be a great idea to use it.

Here's an example of how to do it:

  1. Go to content/examples/... and navigate to the example folder for which you want to add alt-text.
  2. Locate the liveSketch.js file
  3. In the s.setup function add an s.describe() function and pass it your alt-text as a string.

For example:

s.describe(
      'there are two dark spheres side by side, the cursor works like a light source, when mouse moves the direction of light changes and reveals some part of spheres.'
    );

Edit: see for reference 👇

July 30th 2024 edit: added step by step instructions

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions