processing-website icon indicating copy to clipboard operation
processing-website copied to clipboard

Add the describe() function to live examples

Open SableRaf opened this issue 2 years ago • 14 comments

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 👇

  • https://github.com/processing/processing-website#readme
  • https://github.com/processing/processing-website/blob/main/docs/examples.md
  • https://p5js.org/reference/#/p5/describe
  • https://design102.blog.gov.uk/2022/01/14/whats-the-alternative-how-to-write-good-alt-text/

July 30th 2024 edit: added step by step instructions

SableRaf avatar Aug 23 '22 12:08 SableRaf

I can definitely take on this, but as it is quite easy, would you prefer to label it as "good first issue" or so? So that a newcomer (newer than me at least ^^') can tackle on this and get acquainted with VCS?

trikaphundo avatar Aug 24 '22 00:08 trikaphundo

Good idea! Let's see if someone wants to take that on :)

SableRaf avatar Aug 24 '22 07:08 SableRaf

Hi @SableRaf , i would like to work on this issue, only doubt is to which all examples do i have to add the describe function, can you point out these examples to me?

himanshu007-creator avatar Nov 23 '22 18:11 himanshu007-creator

Hi @himanshu007-creator. Ideally this should be added to all the live examples coded in p5.

You could start with a few simple ones:

  • https://processing.org/examples/colorvariables.html
  • https://processing.org/examples/directional.html
  • https://processing.org/examples/mixture.html
  • https://processing.org/examples/mixturegrid.html
  • https://processing.org/examples/onoff.html
  • https://processing.org/examples/reflection.html

For example, in the On/Off live sketch, the describe() function could be added to the p5 code like so:

describe(`A shaded grey cube is rotating slowly. When the mouse is clicked the lights() function is turned off and the cube appears a solid white color.`);

SableRaf avatar Nov 24 '22 18:11 SableRaf

@SableRaf I would love to work on this issue. Do we have to write good alt text to improve the accessibility of sketches?

yogitheboss avatar Feb 10 '23 17:02 yogitheboss

@yogitheboss That's the idea yes! Some might be easier than others. I have listed a few low hanging fruits in the message above. I'll assign this to you. Feel free to ask if you need any more input.

SableRaf avatar Feb 13 '23 13:02 SableRaf

I'd like to contribute to this issue. Let me know if you're also working on this. Excited to contribute!

nikhilhvr avatar Feb 24 '23 12:02 nikhilhvr

Let's see. @yogitheboss are you still working on this?

SableRaf avatar Feb 24 '23 13:02 SableRaf

Yes @SableRaf I am still working on this issue. I would try to pull request few examples tomorrow. Sorry for being late, my exams are going on.

yogitheboss avatar Feb 24 '23 14:02 yogitheboss

For sure! No pressure 😃 I just asked because of @nikhilhvr's request. Good luck with your exams!!

SableRaf avatar Feb 24 '23 14:02 SableRaf

@SableRaf I see that the issue is still open. Is there anything more needed to be added to this issue?

AaryaZ avatar Aug 23 '23 15:08 AaryaZ

Hi @AaryaZ, and thank you for pointing that out. The issue is still open due to some pending changes. I had reviewed the PR from @yogitheboss (https://github.com/processing/processing-website/pull/447) and provided feedback. We're waiting for those updates. Please check the discussion there for more context.

SableRaf avatar Sep 04 '23 12:09 SableRaf

Hi @SableRaf , I'd like to contribute to this issue, if this issue is still open. Please review the changes and provide some feedback on whether this should be modified.

umangutkarsh avatar Oct 04 '23 06:10 umangutkarsh

Hi @umangutkarsh and thanks for your Pull Request. We have provided feedback in the replies.

For future reference to others willing to contribute alt-text via the describe() function, please see this contribution: https://github.com/processing/processing-website/pull/447

SableRaf avatar Jul 30 '24 14:07 SableRaf