You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
describe('ellipse created using arc with its top right open');
225
+
</code>
216
226
</div>
217
227
```
218
228
@@ -230,8 +240,42 @@ function setup() {
230
240
231
241
If you need to link to external asset files, put them in [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5-theme/assets) and then link to them with "assets/filename.ext" in the code. See the [tint example](http://p5js.org/reference/#/p5/tint).
232
242
233
-
### Adding alt-text
234
-
Finally, for every example you add, please add [alt-text](https://moz.com/learn/seo/alt-text) so visually impaired users can understand what the example is showing on the screen. This can be added with the tag `@alt` at the end of all of the examples for a given function (not an individual `@alt` tag under each), add a line break to separate the descriptions for multiple examples.
243
+
### Add a canvas description using describe()
244
+
Finally, for every example you add, you are required to use the p5.js function `describe()` in the example to create a screen-reader accessible description for the canvas. Include only one parameter: a string with a brief description of what is happening on the canvas. Do NOT add a second parameter.
245
+
```
246
+
@example
247
+
<div>
248
+
<code>
249
+
let xoff = 0.0;
250
+
function draw() {
251
+
background(204);
252
+
xoff = xoff + 0.01;
253
+
let n = noise(xoff) * width;
254
+
line(n, 0, n, height);
255
+
decribe('vertical line moves left to right with updating noise values');
256
+
}
257
+
</code>
258
+
</div>
259
+
260
+
<div>
261
+
<code>
262
+
let noiseScale=0.02;
263
+
function draw() {
264
+
background(0);
265
+
for (let x=0; x < width; x++) {
266
+
let noiseVal = noise((mouseX+x)*noiseScale, mouseY*noiseScale);
For more on `describe()` visit the [web accessibility contributor docs](https://p5js.org/contributor-docs/#/web_accessibility?id=user-generated-accessible-canvas-descriptions).
277
+
278
+
Previous documentation guidelines required adding [alt-text](https://moz.com/learn/seo/alt-text) to create screen-reader accessible canvas description. THIS IS NO LONGER RECOMMENDED. ALWAYS USE `describe()`. Previously, alt-text was added with the tag `@alt` at the end of all of the examples for a given function (not an individual `@alt` tag under each), and an added a line break to separate the descriptions for multiple examples.
0 commit comments