Skip to content

Commit

Permalink
Merge branch 'main' into spanish
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityyaX authored Jan 3, 2024
2 parents 9d4976c + 5584416 commit 3b43f53
Show file tree
Hide file tree
Showing 16 changed files with 2,107 additions and 1,913 deletions.
607 changes: 333 additions & 274 deletions src/data/en.yml

Large diffs are not rendered by default.

777 changes: 405 additions & 372 deletions src/data/es.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/data/examples/en/09_Simulate/15_penrose_tiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @name Penrose Tiles
* @arialabel A penrose tile pattern is created by white rhombi being drawn on a black background
* @frame 710,400
* @description This is a port by David Blitz of the "Penrose Tile" example from processing.org/examples
* @description This is a port by David Blitz of the "Penrose Tile" example from <a href="https://processing.org/examples/">processing.org/examples</a>
*/

let ds;
Expand Down
8 changes: 4 additions & 4 deletions src/data/examples/en/10_Interaction/28_ArduinoSensor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
* @description WebJack is a way to read data from an Arduino (and other sources)
* using audio -- it basically turns your Arduino into an audio modem.
*
* https://github.com/publiclab/webjack
* <a href = "https://github.com/publiclab/webjack">https://github.com/publiclab/webjack</a>
*
* Note: WebJack and p5-webjack libraries must be added to your index.html as follows:
* <pre><code class="language-markup">&lt;script src="https://webjack.io/dist/webjack.js">&lt;/script></code></pre>
* <pre><code class="language-markup">&lt;script src="https://jywarren.github.io/p5-webjack/lib.js">&lt;/script></code></pre>
*
* Working example: https://editor.p5js.org/jywarren/sketches/rkztwSt8M
* Working example: <a href = "https://editor.p5js.org/jywarren/sketches/rkztwSt8M">https://editor.p5js.org/jywarren/sketches/rkztwSt8M</a>
*
* Testing audio: https://www.youtube.com/watch?v=GtJW1Dlt3cg
* Testing audio: <a href="https://www.youtube.com/watch?v=GtJW1Dlt3cg">https://www.youtube.com/watch?v=GtJW1Dlt3cg</a>
* Load this sketch onto an Arduino:
* https://create.arduino.cc/editor/jywarren/023158d8-be51-4c78-99ff-36c63126b554/preview
* <a href="https://create.arduino.cc/editor/jywarren/023158d8-be51-4c78-99ff-36c63126b554/preview">https://create.arduino.cc/editor/jywarren/023158d8-be51-4c78-99ff-36c63126b554/preview</a>
* Arduino will output audio from pin 3 + ground. Use microphone or an audio cable.
*/

Expand Down
608 changes: 316 additions & 292 deletions src/data/hi.yml

Large diffs are not rendered by default.

334 changes: 196 additions & 138 deletions src/data/it.yml

Large diffs are not rendered by default.

608 changes: 316 additions & 292 deletions src/data/ko.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/data/learn/learn.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"url": "p5-screen-reader.html"
},
{
"name": "labeling-canvases",
"url": "labeling-canvases.html"
"name": "accessible-labels",
"url": "accessible-labels.html"
}
],
"connecting-p5js-title": [
Expand Down
623 changes: 324 additions & 299 deletions src/data/zh-Hans.yml

Large diffs are not rendered by default.

207 changes: 207 additions & 0 deletions src/templates/pages/learn/accessible-labels.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
---
title: learn
slug: learn/
---

<div id="learn-page">

{{> sidebar}}

<div class="column-span">

<main >

<h1>{{#i18n "accessible-labels-title"}}{{/i18n}}</h1>

<h2>{{#i18n "accessible-labels-intro"}}{{/i18n}}</h2>
<p>{{#i18n "accessible-labels-intro-1"}}{{/i18n}}</p>

<h2>{{#i18n "accessible-labels-what-is-labeling"}}{{/i18n}}</h2>
<p>{{#i18n "accessible-labels-what-is-labeling-1"}}{{/i18n}}</p>

<h2>{{#i18n "accessible-labels-why-labeling-matters"}}{{/i18n}}</h2>
<p>{{#i18n "accessible-labels-why-labeling-matters-1"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-why-labeling-matters-2"}}{{/i18n}}</p>

<h2>{{#i18n "accessible-labels-available-labels"}}{{/i18n}}</h2>
<p>{{#i18n "accessible-labels-available-labels-1"}}{{/i18n}}:</p>
<ul class="list_view">
<li>{{#i18n "accessible-labels-available-labels-li-1"}}{{/i18n}}</li>
<li>{{#i18n "accessible-labels-available-labels-li-2"}}{{/i18n}}</li>
<li>{{#i18n "accessible-labels-available-labels-li-3"}}{{/i18n}}</li>
<li>{{#i18n "accessible-labels-available-labels-li-4"}}{{/i18n}}</li>
</ul>

<h2>{{#i18n "accessible-labels-prerequisites"}}{{/i18n}}</h2>
<p>{{#i18n "accessible-labels-prerequisites-1"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-prerequisites-2"}}{{/i18n}}</p>

<script type="text/p5" data-p5-version="{{ version }}">
function setup() {
createCanvas(100, 100);
describe('A blue square in the center of a black canvas.');
}
function draw() {
background(250);
noStroke();
fill(200,0,0);
rect(67, 67, 20, 20);
}
</script>

<h2>{{#i18n "accessible-labels-steps-for-labeling"}}{{/i18n}}</h2>

<h3>{{#i18n "accessible-labels-steps-for-labeling-step-1"}}{{/i18n}}</h3>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-1-1"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-1-2"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-1-3"}}{{/i18n}}</p>

<script type="text/p5" data-p5-version="{{ version }}">
function setup() {
createCanvas(100, 100);
describe('A red heart in the bottom right corner of a white background.');
}
function draw() {
background(250);
noStroke();
fill(200,0,0);
ellipse(67, 67, 20, 20);
ellipse(83, 67, 20, 20);
triangle(91, 73, 75, 95, 59, 73);
}
</script>

<p>{{#i18n "accessible-labels-steps-for-labeling-step-1-4"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-1-5"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-1-6"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-1-7"}}{{/i18n}}</p>

<h4>{{#i18n "accessible-labels-steps-for-labeling-step-1-complex"}}{{/i18n}}</h4>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-1-complex-1"}}{{/i18n}}</p>
<ul class="list_view">
<li>{{#i18n "accessible-labels-steps-for-labeling-step-1-complex-li-1"}}{{/i18n}}</li>
<li>{{#i18n "accessible-labels-steps-for-labeling-step-1-complex-li-2"}}{{/i18n}}</li>
<li>{{#i18n "accessible-labels-steps-for-labeling-step-1-complex-li-3"}}{{/i18n}}</li>
<li>{{#i18n "accessible-labels-steps-for-labeling-step-1-complex-li-4"}}{{/i18n}}</li>
</ul>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-1-complex-2"}}{{/i18n}}</p>

<h3>{{#i18n "accessible-labels-steps-for-labeling-step-2"}}{{/i18n}}</h3>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-2-1"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-2-2"}}{{/i18n}}</p>
<h4>{{#i18n "accessible-labels-steps-for-labeling-step-2-using-de"}}{{/i18n}}</h4>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-2-using-de-1"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-2-using-de-2"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-2-using-de-3"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-2-using-de-4"}}{{/i18n}}</p>

<script type="text/p5" data-p5-version="{{ version }}">
function setup() {
createCanvas(100, 100);
// Provides an overall description of the canvas.
describe('Text in the top right corner with red heart in the bottom right corner on a white background.');
}
function draw() {
background(250);
noStroke();
fill(200, 0, 0);
textSize(12);
textStyle(NORMAL);
// Specific label for text.
describeElement('Text', 'The text "Hello world!" in the upper left corner of a white canvas.');
text('Hello world!', 5, 30);
// Specific label for the heart.
describeElement('Heart', 'A red heart in the bottom right corner.');
ellipse(67, 67, 20, 20);
ellipse(83, 67, 20, 20);
triangle(91, 73, 75, 95, 59, 73);
}
</script>

<p>{{#i18n "accessible-labels-steps-for-labeling-step-2-using-de-5"}}{{/i18n}}</p>
<h4>{{#i18n "accessible-labels-steps-for-labeling-step-2-using-go-to"}}{{/i18n}}</h4>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-2-using-go-to-1"}}{{/i18n}}</p>
<h4>{{#i18n "accessible-labels-steps-for-labeling-step-2-animated"}}{{/i18n}}</h4>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-2-animated-1"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-2-animated-2"}}{{/i18n}}</p>

<script type="text/p5" data-p5-version="{{ version }}">
let x = 0;
function setup() {
createCanvas(100, 100);
}
function draw() {
if (x > 100) {
x = 0;
}
background(220);
fill(0, 255, 0);
ellipse(x, 50, 40, 40);
x = x + 0.1;
// Label updates with shape’s translation.
describe(`A green circle at x position ${round(x)}, moving to the right.`, LABEL);
}
</script>

<h4>{{#i18n "accessible-labels-steps-for-labeling-step-2-do-donts"}}{{/i18n}}</h4>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-2-do-donts-1"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-2-do-donts-2"}}{{/i18n}}</p>

<h3>{{#i18n "accessible-labels-steps-for-labeling-step-3"}}{{/i18n}}</h3>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-3-1"}}{{/i18n}}</p>

<script type="text/p5" data-p5-version="{{ version }}">
function setup() {
createCanvas(100, 100);
}
function draw() {
// LABEL shows the label next to the canvas.
gridOutput(LABEL);
background(250);
noStroke();
fill(200, 0, 0);
ellipse(67, 67, 20, 20);
ellipse(83, 67, 20, 20);
triangle(91, 73, 75, 95, 59, 73);
}
</script>

<p>{{#i18n "accessible-labels-steps-for-labeling-step-3-2"}}{{/i18n}}</p>
<ul class="list_view">
<li>{{#i18n "accessible-labels-steps-for-labeling-step-3-2-li-1"}}{{/i18n}}</li>
<li>{{#i18n "accessible-labels-steps-for-labeling-step-3-2-li-2"}}{{/i18n}}</li>
</ul>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-3-3"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-steps-for-labeling-step-3-4"}}{{/i18n}}</p>

<h2>{{#i18n "accessible-labels-conclusion"}}{{/i18n}}</h2>
<p>{{#i18n "accessible-labels-conclusion-1"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-conclusion-2"}}{{/i18n}}</p>
<p>{{#i18n "accessible-labels-conclusion-3"}}{{/i18n}}</p>

<!-- this script only needs to get added once even if there are multiple widget instances -->
<script src= "//toolness.github.io/p5.js-widget/p5-widget.js"></script>

</main>

{{> footer}}

</div> <!-- end column-span -->

{{> asterisk}}

</div><!-- end id="get-started-page" -->
Loading

0 comments on commit 3b43f53

Please sign in to comment.