Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.6k
Improve Accessibility Guidance fordescribe()
Usage#8101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:dev-2.0
Are you sure you want to change the base?
Changes from1 commit
06019f3
8f24e3e
0aaf553
486e2db
944779c
6633de2
eb58aba
78ce6ac
2759e37
3da06c0
f911702
a0fae01
b218819
cebc00c
e2bd6b1
8549b93
cf75292
51534d6
74601d0
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -35,6 +35,7 @@ Our community is large and diverse. Many people learn to code using p5.js, and a | ||
- [Accessibility and Disability](#accessibility-and-disability) | ||
- [Code Samples](#code-samples) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. These content needs to be present inside I’m not quite sure why it’s being added again under the “Documentation Style Guide” section, and then repeated inside the code section below. | ||
- [Comments](#comments) | ||
- [Accessible Descriptions](#accessible-descriptions) | ||
- [Whitespace](#whitespace) | ||
- [Semicolons](#semicolons) | ||
- [Naming Conventions](#naming-conventions) | ||
@@ -50,7 +51,6 @@ Our community is large and diverse. Many people learn to code using p5.js, and a | ||
- [Chaining](#chaining) | ||
- [Classes](#classes) | ||
- [Assets](#assets) | ||
## YUIDoc | ||
@@ -232,6 +232,29 @@ I will use // for multiline comments. | ||
``` | ||
## Accessible Descriptions | ||
- Use `describe()` to make p5.js sketches accessible to screen readers. All reference contributions should include a concise, visual canvas description for accessibility. | ||
- **Concise:** 1–3 sentences. Briefly describe what is visually present on the canvas. | ||
- Good: `describe('A blue rectangle in the center of a white canvas.');` | ||
- Bad: `describe('This code draws a rectangle.');` | ||
- **Visual-Only:** Focus on what a sighted user would see. Do not describe code, instructions, or interactions unless they are visually represented. | ||
- Good: `describe('A red heart and yellow circle over a pink background.');` | ||
- Bad: `describe('Click to draw a heart.');` | ||
- **Non-Redundant:** Avoid repeating information already available in the title or code comments. | ||
- Good: `describe('A black dot moves from bottom to top on a gray square.');` | ||
- Bad: `describe('A shape.');` | ||
- **Clarity:** Use simple, direct language. End with punctuation for screen reader clarity. | ||
- Good: `describe('A green triangle on a white background.');` | ||
- Bad: `describe('triangle');` | ||
New to writing accessible canvas descriptions? Please check the [Web Accessibility Contributor Doc](./web_accessibility.md#user-generated-accessible-canvas-descriptions) and [Writing Accessible Canvas Descriptions tutorial](https://p5js.org/tutorials/writing-accessible-canvas-descriptions/) next. | ||
**[⬆ back to top](#table-of-contents)** | ||
## Whitespace | ||
@@ -1224,52 +1247,11 @@ class Mover { | ||
## Assets | ||
> Why? It models good project organization. It's also required for assets to load on the p5.js website. Place assets in the following folders to include them in our online documentation: | ||
- Examples: [src/data/examples/assets](https://github.com/processing/p5.js-website/tree/main/src/data/examples) | ||
- Reference Pages: [src/templates/pages/reference/assets](https://github.com/processing/p5.js-website/tree/main/src/templates/pages/reference/assets) | ||
- Learn Pages: [src/assets/learn](https://github.com/processing/p5.js-website/tree/main/src/assets/learn) | ||
```javascript | ||
Always load assets from a folder called "assets". |
Uh oh!
There was an error while loading.Please reload this page.