Skip to content

Commit

Permalink
Merge pull request #6833 from nickmcintyre/ref-accessibility
Browse files Browse the repository at this point in the history
Update accessibility references
  • Loading branch information
Qianqianye authored Mar 9, 2024
2 parents 4296060 + f646d98 commit e465e0f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
16 changes: 9 additions & 7 deletions src/accessibility/describe.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const labelTableId = '_labelTable'; //Label Table
const labelTableElId = '_lte_'; //Label Table Element

/**
* Creates a screen reader-accessible description for the canvas.
* Creates a screen reader-accessible description of the canvas.
*
* The first parameter, `text`, is the description of the canvas.
*
Expand All @@ -28,8 +28,8 @@ const labelTableElId = '_lte_'; //Label Table Element
* visible to screen readers. This is the default mode.
*
* Read
* <a href="/learn/labeling-canvases.html">How to label your p5.js code</a> to
* learn more about making sketches accessible.
* <a href="/learn/accessible-labels.html">Writing accessible canvas descriptions</a>
* to learn more about making sketches accessible.
*
* @method describe
* @param {String} text description of the canvas.
Expand Down Expand Up @@ -160,8 +160,10 @@ p5.prototype.describe = function(text, display) {
};

/**
* Creates a screen reader-accessible description for elements in the canvas.
* Elements are shapes or groups of shapes that create meaning together.
* Creates a screen reader-accessible description of elements in the canvas.
*
* Elements are shapes or groups of shapes that create meaning together. For
* example, a few overlapping circles could make an "eye" element.
*
* The first parameter, `name`, is the name of the element.
*
Expand All @@ -177,8 +179,8 @@ p5.prototype.describe = function(text, display) {
* mode.
*
* Read
* <a href="/learn/labeling-canvases.html">How to label your p5.js code</a> to
* learn more about making sketches accessible.
* <a href="/learn/accessible-labels.html">Writing accessible canvas descriptions</a>
* to learn more about making sketches accessible.
*
* @method describeElement
* @param {String} name name of the element.
Expand Down
26 changes: 12 additions & 14 deletions src/accessibility/outputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
import p5 from '../core/main';

/**
* Creates a screen reader-accessible description for shapes on the canvas.
* `textOutput()` adds a general description, list of shapes, and
* table of shapes to the web page.
* Creates a screen reader-accessible description of shapes on the canvas.
*
* The general description includes the canvas size, canvas color, and number
* of shapes. For example,
* `textOutput()` adds a general description, list of shapes, and
* table of shapes to the web page. The general description includes the
* canvas size, canvas color, and number of shapes. For example,
* `Your output is a, 100 by 100 pixels, gray canvas containing the following 2 shapes:`.
*
* A list of shapes follows the general description. The list describes the
Expand All @@ -35,8 +34,8 @@ import p5 from '../core/main';
* mode.
*
* Read
* <a href="/learn/labeling-canvases.html">How to label your p5.js code</a> to
* learn more about making sketches accessible.
* <a href="/learn/accessible-labels.html">Writing accessible canvas descriptions</a>
* to learn more about making sketches accessible.
*
* @method textOutput
* @param {Constant} [display] either FALLBACK or LABEL.
Expand Down Expand Up @@ -143,12 +142,11 @@ p5.prototype.textOutput = function(display) {
};

/**
* Creates a screen reader-accessible description for shapes on the canvas.
* `gridOutput()` adds a general description, table of shapes, and list of
* shapes to the web page.
* Creates a screen reader-accessible description of shapes on the canvas.
*
* The general description includes the canvas size, canvas color, and number of
* shapes. For example,
* `gridOutput()` adds a general description, table of shapes, and list of
* shapes to the web page. The general description includes the canvas size,
* canvas color, and number of shapes. For example,
* `gray canvas, 100 by 100 pixels, contains 2 shapes: 1 circle 1 square`.
*
* `gridOutput()` uses its table of shapes as a grid. Each shape in the grid
Expand All @@ -171,8 +169,8 @@ p5.prototype.textOutput = function(display) {
* mode.
*
* Read
* <a href="/learn/labeling-canvases.html">How to label your p5.js code</a> to
* learn more about making sketches accessible.
* <a href="/learn/accessible-labels.html">Writing accessible canvas descriptions</a>
* to learn more about making sketches accessible.
*
* @method gridOutput
* @param {Constant} [display] either FALLBACK or LABEL.
Expand Down

0 comments on commit e465e0f

Please sign in to comment.