Skip to content

Commit f1c0540

Browse files
authored
Fixing some monthly issues (#3810)
* Elements must be properly terminated with a matching end-tag * Headings must be inside sections
1 parent cb2b9c4 commit f1c0540

File tree

6 files changed

+55
-44
lines changed

6 files changed

+55
-44
lines changed

techniques/aria/ARIA12.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
33
<head>
44
<title>Using role=heading to identify headingstitle>
5-
<link rel="stylesheet" type="text/css" href="../../css/editors.css" class="remove">
5+
<link rel="stylesheet" type="text/css" href="../../css/editors.css" class="remove"/>
66
head>
77
<body>
88
<h1>Using <code class="language-html">role=headingcode> to identify headingsh1>

techniques/failures/F15.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@

Failure of Success Criterion 4.1.2 due to implementing custom controls that

5959
<a href="https://www.w3.org/WAI/ARIA/apg/">WAI-ARIA Authoring Practices Guidea>
6060
li>
6161
<li>
62-
<a href="https://www.w3.org/TR/html-aria/"ARIA in HTMLa>
62+
<a href="https://www.w3.org/TR/html-aria/">ARIA in HTMLa>
6363
li>
6464
ul>
6565

techniques/general/G211.html

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,21 @@

Text in label element provides name for i

4646
<pre><code class="language-html"><input type="checkbox" id="notification" name="notify" value="delays">
4747
<label for="notification">Notify me of delays</label>
4848
code>pre>
49-
<h4>Working sample of inputh4>
50-
<input type="checkbox" id="notification" name="notify" value="delays"/>
51-
<label for="notification">Notify me of delayslabel>
49+
<section>
50+
<h4>Working sample of inputh4>
51+
<input type="checkbox" id="notification" name="notify" value="delays"/>
52+
<label for="notification">Notify me of delayslabel>
53+
section>
5254
section>
5355
<section class="example">
5456
<h3>The button text provides the accessible nameh3>
5557

5658
<p>The text inside a <code class="language-html">buttoncode> element becomes both its visible label and its accessible name:p>
5759
<code class="language-html"><button>Send</button>code>
58-
59-
<h4>Non-working sample of buttonh4>
60-
<button type="button">Sendbutton>
60+
<section>
61+
<h4>Non-working sample of buttonh4>
62+
<button type="button">Sendbutton>
63+
section>
6164
section>
6265

6366
<section class="example">
@@ -133,7 +136,7 @@

Range of inputs with few labels

133136
figure>
134137

135138
<p>The two labels, "Hated it" and "Loved it", are adjacent to the first and last radio buttons, and should be their accessible names. Speech-input users can speak either of these labels to select a radio button, and then use arrow navigation (e.g., "Press right arrow") to modify the selection. "Rate your response" is the text describing the whole widget and can be associated as the group label (here using <code class="language-html">legendcode>). The three middle radio buttons do not have visible labels. In the code example they are given title attributes of "Disliked", "So-so" and "Liked" in order to meet 3.3.2 Labels or Instructions.p>
136-
<pre><code class=""language-html><fieldset>
139+
<pre><code class="language-html"><fieldset>
137140
<legend>Rate your response</legend>
138141
<label for="hated">Hated it</label>
139142
<input type="radio" name="meal" id="hated" value="hated">
@@ -156,16 +159,16 @@

Text in parentheses and punctuation

156159
<label for="name">Name</label> *
157160
<input type="text" name="name" id="name" required>
158161
<label for="birth">Birth date</label> <span id="mask">(YYYY-MM-DD)</span>
159-
<input type="text" name="birth" id="birth" aria-describedby="mask">pre>code>
162+
<input type="text" name="birth" id="birth" aria-describedby="mask">code>pre>
160163

161164
<section>
162165
<h4>Working sample of inputs with simplified accessible namesh4>
163166

164167

165168
<div><label for="name">Namelabel> *div>
166-
<input type="text" name="name" id="name" required>
169+
<input type="text" name="name" id="name" required="required"/>
167170
<div><label for="birth">Birthdatelabel> <span id="mask">(YYYY-MM-DD)span>div>
168-
<input type="text" name="birth" id="birth" aria-describedby="mask">
171+
<input type="text" name="birth" id="birth" aria-describedby="mask"/>
169172
section>
170173

171174
<p>

techniques/general/G56.html

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,46 @@

An announcer speaking over a riot scene

2121
<h3>Sufficient audio contrast between a narrator and background musich3>
2222

2323
<p>This example demonstrates a voice with music in the background in which the voice is the appropriate 20 DB above the background. The voice (foreground) is recorded at -17.52 decibels (average RMS) and the music (background) is at -37.52 decibels, which makes the foreground 20 decibels louder than the background.p>
24-
<h4>Audio exampleh4>
25-
<p class="working-example">
26-
<a href="../../working-examples/audio-contrast/good-contrast.mp3">Audio Example: Foreground is 20 decibels above the background (mp3)a>
27-
p>
28-
<h4>Transcript of audio example (good contrast)h4>
29-
<p>"Usually the foreground refers to a voice that is speaking and should be understood. My speaking voice right now is 20 decibels above the background which is the music. This is an example of how it should be done.."p>
30-
<h4>Visual example of the recording aboveh4>
31-
<p>The audio example above is visually represented below in a snapshot of the file in an audio editor. A section is highlighted that contains foreground and background. It is a much larger wave than the section that contains only background.p>
32-
<figure id="figure-visual-color-contrast">
33-
<img alt="A display showing a sound wave. The left third of the sound wave is just background noise, registering from -10 to +10 decibels. The remaining right-hand section is foreground and background noise showing a range from -50 to +40 decibels." src="img/Audio_3.jpg"/>
34-
<figcaption>Visual representation of sufficient contrast.figcaption>
35-
figure>
36-
24+
<section>
25+
<h4>Audio exampleh4>
26+
<p class="working-example">
27+
<a href="../../working-examples/audio-contrast/good-contrast.mp3">Audio Example: Foreground is 20 decibels above the background (mp3)a>
28+
p>
29+
section>
30+
<section>
31+
<h4>Transcript of audio example (good contrast)h4>
32+
<p>"Usually the foreground refers to a voice that is speaking and should be understood. My speaking voice right now is 20 decibels above the background which is the music. This is an example of how it should be done.."p>
33+
section>
34+
<section>
35+
<h4>Visual example of the recording aboveh4>
36+
<p>The audio example above is visually represented below in a snapshot of the file in an audio editor. A section is highlighted that contains foreground and background. It is a much larger wave than the section that contains only background.p>
37+
<figure id="figure-visual-color-contrast">
38+
<img alt="A display showing a sound wave. The left third of the sound wave is just background noise, registering from -10 to +10 decibels. The remaining right-hand section is foreground and background noise showing a range from -50 to +40 decibels." src="img/Audio_3.jpg"/>
39+
<figcaption>Visual representation of sufficient contrast.figcaption>
40+
figure>
41+
section>
3742
section>
3843
<section class="example">
3944
<h3>Insufficient Audio Contrast between a narrator and background musich3>
40-
45+
<section>
4146
<h4>Audio example of the failureh4>
4247
<p>This example demonstrates a voice with music in the background in which the voice is not 20 DB above the background. The voice (foreground) is at -18 decibels and the music (background) is at about -16 decibels making the foreground only 2 decibels louder than the background.p>
4348
<p class="working-example">
4449
<a href="../../working-examples/audio-contrast/bad-contrast.mp3">Audio Example: Foreground is less than 20 decibels above the background (mp3)a>
4550
p>
51+
section>
52+
<section>
4653
<h4>Transcript of audio example (bad contrast)h4>
4754
<p>"This is an example of a voice that is not loud enough against the background. The voice which is the foreground is only about 2 decibels above the background. Therefore is difficult to understand for a person who is hard of hearing. It is hard to discern one word from the next. This is an example of what not to do."p>
55+
section>
56+
<section>
4857
<h4>Visual example of the failureh4>
4958
<p>The highlighted section contains foreground and background. The wave is almost the same size the section that contains only background, which means the background is too loud in comparison to the foreground voice.p>
5059
<figure id="figure-visual-representation-poor-contrast">
5160
<img alt="A display showing a sound wave. A short section on the left is just background noise with a range of -35db to +35db. The main section of the wave has background and foreground noise, with a range of almost -70db to +70db. The final background-only section has a spike of a similar size." src="img/Audio_4.jpg"/>
5261
<figcaption>Visual representation of bad contrast.figcaption>
5362
figure>
54-
63+
section>
5564
section>
5665
section><section id="tests"><h2>Testsh2>
5766
<section class="procedure"><h3>Procedureh3>

understanding/20/name-role-value.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
>
22
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
33
<head>
4-
<meta charset="UTF-8">
4+
<meta charset="UTF-8">meta>
55
<title>Understanding Name, Role, Valuetitle>
6-
<link rel="stylesheet" type="text/css" href="../../css/sources.css" class="remove">
6+
<link rel="stylesheet" type="text/css" href="../../css/sources.css" class="remove"/>
77
head>
88
<body>
99
<h1>Understanding Name, Role, Valueh1>

understanding/21/label-in-name.html

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,25 @@

Symbolic text characters

5050
figure>
5151
<p>Likewise, where an author has used a greater-than symbol (">") to mimic the appearance of the right-facing arrow, the text does not convey something in human language. It is a symbol, in this scenario likely meant to mimic the icons used for a "Play" button or a "Next" arrow.p>
5252
section>
53-
<h4>Punctuation and capitalizationh4>
5453

5554
<section>
56-
<p>The use of punctuation and capitalization in labels <em>mayem> also be considered optional for the same reason. For example, the colon conventionally added at the end of input labels does not express something in human language, and capitals on the first letter of each word in a label do not normally alter the words' meaning. This is particularly relevant in the context of this SC, since it is primarily aimed at users of speech recognition; capitals and most punctuation are frequently ignored when a user speaks a label as a means of interacting with a control.p>
57-
58-
<p>While it is certainly not an error to include the colon and capitalization in the accessible name, a computed name of "First name" should not be considered a failure of "First Name:".<br />
59-
<label for="firstname">First Name: label><input id="firstname" type="text" name="firstname" /><br />
60-
Likewise, "Next…" visibly shown on a button could have "Next" as the accessible name.<br />
61-
<input type="submit" value="Next..." />. When in doubt, where a meaningful visible label exists, match the string exactly for the accessible name.p>
55+
<h4>Punctuation and capitalizationh4>
56+
<p>The use of punctuation and capitalization in labels <em>mayem> also be considered optional for the same reason. For example, the colon conventionally added at the end of input labels does not express something in human language, and capitals on the first letter of each word in a label do not normally alter the words' meaning. This is particularly relevant in the context of this SC, since it is primarily aimed at users of speech recognition; capitals and most punctuation are frequently ignored when a user speaks a label as a means of interacting with a control.p>
6257

58+
<p>While it is certainly not an error to include the colon and capitalization in the accessible name, a computed name of "First name" should not be considered a failure of "First Name:".<br />
59+
<label for="firstname">First Name: label><input id="firstname" type="text" name="firstname" /><br />
60+
Likewise, "Next…" visibly shown on a button could have "Next" as the accessible name.<br />
61+
<input type="submit" value="Next..." />. When in doubt, where a meaningful visible label exists, match the string exactly for the accessible name.p>
6362
section>
6463

65-
<h4>Mathematical expressions and formulaeh4>
66-
<section>
67-
<p>Mathematical expressions are an exception to the previous subsection about symbolic characters. Math symbols can be used as labels; for example "11×3=33" and "A>B" convey meaning.<br />
64+
<section>
65+
<h4>Mathematical expressions and formulaeh4>
66+
<p>Mathematical expressions are an exception to the previous subsection about symbolic characters. Math symbols can be used as labels; for example "11×3=33" and "A>B" convey meaning.<br />
6867

69-
<input type="radio" name="equation" id="answer1" value="A>B" /><label for="answer1">A>Blabel>
70-
<input type="radio" name="equation" id="answer2" value="11&times3=33" /><label for="answer2">11&times3=33label>
71-
p>
72-
<p>The label should not be overwritten in the accessible name, and substitutions of words where a formula is used should be avoided since there are multiple ways to express the same equation. For example, making the name "eleven multiplied by three is equivalent to thirty-three" might mean a user who said "eleven times three equals thirty-three" may not match. It is best to leave the formulas as used in the label and count on the user's familiarity with their speech software to achieve a match. Further, converting a mathematical formula label into an accessible name that is a spelled-out equivalent may create issues for translation. The name should match the label's formula text. Note that a consideration for authors is to use the proper symbol in the formula. For instance 11x3 (with a lower or upper case letter X), 11*3 (with the asterisk symbol), and 11×3 (with the <code>&code>times<code>;code> symbol) are all easy for sighted users to interpret as meaning the same formula, but may not all be matched to "11 times 3" by the speech recognition software. The proper operator symbol (in this case the times symbol) should be used.p>
68+
<input type="radio" name="equation" id="answer1" value="A>B" /><label for="answer1">A>Blabel>
69+
<input type="radio" name="equation" id="answer2" value="11&#215;3=33" /><label for="answer2">11&#215;3=33label>
70+
p>
71+
<p>The label should not be overwritten in the accessible name, and substitutions of words where a formula is used should be avoided since there are multiple ways to express the same equation. For example, making the name "eleven multiplied by three is equivalent to thirty-three" might mean a user who said "eleven times three equals thirty-three" may not match. It is best to leave the formulas as used in the label and count on the user's familiarity with their speech software to achieve a match. Further, converting a mathematical formula label into an accessible name that is a spelled-out equivalent may create issues for translation. The name should match the label's formula text. Note that a consideration for authors is to use the proper symbol in the formula. For instance 11x3 (with a lower or upper case letter X), 11*3 (with the asterisk symbol), and 11×3 (with the <code>&code>times<code>;code> symbol) are all easy for sighted users to interpret as meaning the same formula, but may not all be matched to "11 times 3" by the speech recognition software. The proper operator symbol (in this case the times symbol) should be used.p>
7372
section>
7473
section>
7574
<section>
@@ -89,7 +88,7 @@

Text in parentheses

8988
<section>
9089
<p>Note: The term "parenthetical" in this section is describing text that literally appears within a set of round brackets (). It is not used in the more abstract sense of "information related to".p>
9190
<p>It is important to mention parenthetical text in labels in the context of accessible name versus description. In common usage, text in parentheses is considered secondary but relevant to meaning. Users of speech recognition would not typically announce text in parentheses as part of the input name. For that reason, parenthetical text may be optionally considered a description and left out of the accessible name.p>
92-
<p>However, where parenthetical information provides important context, such as indication of a required field or limitations on what is allowed for input, this information must be provided programmatically in some other way to the user if that information is not included as part of the accessible name. For example, "Name (required)" and "Date (YYYY-MM-DD)" could accept "Name" and "Date" as the accessible names. However, in order to pass 1.3.1 Info & Relationships, authors would need to programmatically surface both the required state and the limit on the allowed data formatting (in this example, eight integers fitting the YYYY-MM-DD pattern). The "required" state could be surfaced through the HTML <code>requiredcode> attribute or by using <code>aria-required="true"code>. The allowed data formatting could be surfaced by being referenced using the <code>aria-describedbycode>) attribute.p>
91+
<p>However, where parenthetical information provides important context, such as indication of a required field or limitations on what is allowed for input, this information must be provided programmatically in some other way to the user if that information is not included as part of the accessible name. For example, "Name (required)" and "Date (YYYY-MM-DD)" could accept "Name" and "Date" as the accessible names. However, in order to pass 1.3.1 Info &amp; Relationships, authors would need to programmatically surface both the required state and the limit on the allowed data formatting (in this example, eight integers fitting the YYYY-MM-DD pattern). The "required" state could be surfaced through the HTML <code>requiredcode> attribute or by using <code>aria-required="true"code>. The allowed data formatting could be surfaced by being referenced using the <code>aria-describedbycode>) attribute.p>
9392
section>
9493

9594

0 commit comments

Comments
 (0)