Skip to content

Commit 831cb5c

Browse files
committed
aXe fixes
1 parent 74c97c0 commit 831cb5c

11 files changed

+50
-53
lines changed

partials/section.about.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<!-- Start of #about -->
2-
<aside id="about" aria-labelledby="title-about">
1+
<!-- Start of #section-about -->
2+
<aside id="section-about" aria-labelledby="title-about">
33
<h2 id="title-about">About</h2>
44
<p>
55
Accessible, semantic markup patterns for HTML content. Uses the full <a rel="external noopener" href="http://html5doctor.com/element-index/"><cite>HTML5 Doctor Element Index</cite></a>, minus the <code translate="no">&lt;command&gt;</code> and <code translate="no">&lt;menu&gt;</code> tags.
@@ -8,4 +8,4 @@
88
Reference <a rel="external noopener" href="http://alistairduggin.co.uk/">Alistair Duggin</a>'s <a rel="external noopener" href="http://aduggin.github.io/accessibility-fails/"><cite>Accessibility Fails</cite></a> for common markup pattern accessibility mistakes, and <a rel="external noopener" href="http://pauljadam.com/">Paul J. Adam</a>'s <a rel="external noopener" href="http://pauljadam.com/demos/landmarks.html"><cite>WAI-ARIA Landmarks Site Navigation Structure Demo</cite></a> for semantic, accessible page landmarks.
99
</p>
1010
</aside>
11-
<!-- End of #about -->
11+
<!-- End of #section-about -->

partials/section.embedded.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</figcaption>
4848
</figure>
4949

50-
<h3>Notes:</h3>
50+
<h3 id="notes-inline-svg">Notes:</h3>
5151
<ul>
5252
<li>
5353
<small>Be sure to provide values for the <code translate="no">height</code> and <code translate="no">width</code> attributes so <abbr>SVGs</abbr> won't expand to fill the page if styles don't load.</small>
@@ -142,7 +142,7 @@
142142
Please <a rel="external noopener" href="http://browsehappy.com/">consider upgrading your browser</a> or <a download href="http://clips.vorwaerts-gmbh.de/VfE_html5.mp4">download a file</a> for offline viewing.
143143
</video>
144144

145-
<h3>Notes:</h3>
145+
<h3 id="notes-video">Notes:</h3>
146146
<p>
147147
<small>Accessibility errors concerning the video's missing audio description should go away once the <code translate="no">&lt;track&gt;</code>'s source is linked to a valid caption file.</small>
148148
</p>
@@ -186,9 +186,9 @@
186186
Please <a rel="external noopener" href="http://browsehappy.com/">consider upgrading your browser</a>.
187187
</canvas>
188188

189-
<h3>Notes:</h3>
189+
<h3 id="notes-canvas">Notes:</h3>
190190
<p>
191-
<small>Add <code translate="no">role="presentation"</code> to <code translate="no">&lt;track&gt;</code> to <a rel="external noopener" href="https://twitter.com/stevefaulkner/status/1039470607719694336">mute epeated announcement of graphic role by some screen readers</a>.
191+
<small>Add <code translate="no">role="presentation"</code> to <code translate="no">&lt;track&gt;</code> to <a rel="external noopener" href="https://twitter.com/stevefaulkner/status/1039470607719694336">mute epeated announcement of graphic role by some screen readers</a>.</small>
192192
</p>
193193
<!-- End of #subsection-canvas -->
194194
</section>

partials/section.footer.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- Start of #section-credit -->
2-
<footer id="section-credit" aria-labelledby="title-credit" role="contentinfo">
2+
<footer id="section-credit" role="contentinfo">
33
<h2 id="title-credit">Credit</h2>
44
<p>
55
Inspired by <a rel="external noopener" href="http://mrmrs.cc/">Adam Morse</a>'s <a rel="external noopener" href="https://github.com/mrmrs/html"><cite>mrmrs/html</cite></a>.

partials/section.forms.hbs

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<h2 id="title-forms">Forms</h2>
44
<form>
55
<!-- Start of #subsection-text-input -->
6-
<fieldset id="subsection-text-input" role="region" aria-labelledby="subtitle-text-input">
6+
<fieldset id="subsection-text-input">
77
<legend>
88
<h3 id="subtitle-text-input">Text Input</h3>
99
</legend>
@@ -163,7 +163,7 @@
163163
<!-- End of #subsection-text-input -->
164164

165165
<!-- Start of #subsection-non-text-input -->
166-
<fieldset id="subsection-non-text-input" role="region" aria-labelledby="subtitle-non-text-input">
166+
<fieldset id="subsection-non-text-input">
167167
<legend>
168168
<h3 id="subtitle-non-text-input">Non-text Input</h3>
169169
</legend>
@@ -192,15 +192,15 @@
192192
type="range" />
193193
</label>
194194

195-
<h4>Notes:</h4>
195+
<h4 id="notes-non-text-input">Notes:</h4>
196196
<p>
197197
<small>Some pointers on <a rel="external noopener" href="https://css-tricks.com/sliding-nightmare-understanding-range-input/">styling the range input</a>.</small>
198198
</p>
199199
</fieldset>
200200
<!-- End of #subsection-non-text-input -->
201201

202202
<!-- Start of #subsection-select -->
203-
<fieldset id="subsection-select" role="region" aria-labelledby="subtitle-select">
203+
<fieldset id="subsection-select">
204204
<legend>
205205
<h3 id="subtitle-select">Select</h3>
206206
</legend>
@@ -255,7 +255,7 @@
255255
<!-- End of #subsection-select -->
256256

257257
<!-- Start of #subsection-checkboxes-and-radios -->
258-
<fieldset id="subsection-checkboxes-and-radios" role="region" aria-labelledby="subtitle-checkboxes-and-radio-buttons">
258+
<fieldset id="subsection-checkboxes-and-radios">
259259
<legend>
260260
<h3 id="subtitle-checkboxes-and-radio-buttons">Checkboxes and Radio Buttons</h3>
261261
</legend>
@@ -379,7 +379,7 @@
379379
<!-- End of #subsection-checkboxes-and-radios -->
380380

381381
<!-- Start of #subsection-buttons -->
382-
<fieldset id="subsection-button-states" role="region" aria-labelledby="subtitle-button-states">
382+
<fieldset id="subsection-button-states">
383383
<legend>
384384
<h3 id="subtitle-button-states">Buttons</h3>
385385
</legend>
@@ -428,7 +428,7 @@
428428
Text Button
429429
</span>
430430

431-
<h4>Notes:</h4>
431+
<h4 id="notes-buttons">Notes:</h4>
432432
<ul>
433433
<li>
434434
<small>Add <code translate="no">type="button"</code> to <code translate="no">&lt;button&gt;</code> elements placed outside of forms to prevent some browsers from attempting to submit form data.</small>
@@ -447,7 +447,7 @@
447447
<!-- End of #subsection-buttons -->
448448

449449
<!-- Start of #subsection-output -->
450-
<fieldset id="subsection-output" role="region" aria-labelledby="subtitle-output">
450+
<fieldset id="subsection-output">
451451
<legend>
452452
<h3 id="subtitle-output">Output</h3>
453453
</legend>
@@ -473,7 +473,7 @@
473473
<!-- End of #subsection-output -->
474474

475475
<!-- Start of #subsection-lockup -->
476-
<fieldset id="subsection-lockup" role="region" aria-labelledby="subtitle-lockup">
476+
<fieldset id="subsection-lockup">
477477
<legend>
478478
<h3 id="subtitle-lockup">Lockup</h3>
479479
</legend>
@@ -496,15 +496,15 @@
496496
I agree
497497
</label>
498498

499-
<h4>Notes:</h4>
499+
<h4 id="notes-lockup">Notes:</h4>
500500
<p>
501501
<small>Place messaging above the input field so as to not be lost when magnification or focus on mobile occurs.</small>
502502
</p>
503503
</fieldset>
504504
<!-- End of #subsection-lockup -->
505505

506506
<!-- Start of #subsection-states-and-validation -->
507-
<fieldset id="subsection-states-and-validation" role="region" aria-labelledby="subtitle-states-and-validation">
507+
<fieldset id="subsection-states-and-validation">
508508
<legend>
509509
<h3 id="subtitle-states-and-validation">States and Validation</h3>
510510
</legend>
@@ -630,7 +630,7 @@
630630
Loading
631631
</button>
632632

633-
<h5>Notes:</h5>
633+
<h5 id="notes-button-states-and-validation">Notes:</h5>
634634
<p>
635635
<small>Use <code translate="no">:hover</code>, <code translate="no">:focus</code>, and <code translate="no">:active</code> selectors to control the other button states. Learn more about <a rel="external noopener" href="https://css-tricks.com/user-facing-state/">semantically managing state</a> and using <a rel="external noopener" href="https://medium.com/eightshapes-llc/buttons-in-design-systems-eac3acf7e23#.b1p96hsrw"><cite>Buttons in Design Systems</cite></a>.</small>
636636
</p>
@@ -640,7 +640,7 @@
640640
<!-- End of #subsection-states-and-validation -->
641641

642642
<!-- Start of #subsection-autocomplete -->
643-
<fieldset role="region" aria-labelledby="subtitle-autocomplete" id="subsection-autocomplete">
643+
<fieldset id="subsection-autocomplete">
644644
<legend>
645645
<h3 id="subtitle-autocomplete">Autocomplete</h3>
646646
</legend>
@@ -787,7 +787,7 @@
787787
<input
788788
id="input-autocomplete-street-address"
789789
name="autocomplete-street-address"
790-
autocomplete="street-address"
790+
autocomplete="shipping street-address"
791791
autocorrect="off"
792792
type="text" />
793793
</label>
@@ -836,7 +836,7 @@
836836
novalidate
837837
id="input-autocomplete-postal-code"
838838
name="autocomplete-postal-code"
839-
autocomplete="postal-code"
839+
autocomplete="shipping postal-code"
840840
autocorrect="off"
841841
type="number" />
842842
</label>
@@ -1053,11 +1053,10 @@
10531053
type="file" />
10541054
</label>
10551055

1056-
<h4>Notes:</h4>
1056+
<h4 id="notes-autocomplete">Notes:</h4>
10571057
<p>
10581058
<small>Be sure to reference the <a rel="external noopener" href="http://spaceninja.com/2015/12/08/falsehoods-programmers-believe/"><cite>Falsehoods Programmers Believe</cite></a> collection for creating bulletproof inputs.</small>
10591059
</p>
1060-
10611060
</fieldset>
10621061
<!-- End of #subsection-autocomplete -->
10631062
</form>

partials/section.headings.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<p>Subtitle</p>
3838
</header>
3939

40-
<h2>Notes:</h2>
40+
<h2 id="notes-headings">Notes:</h2>
4141
<p>
4242
<small>Ensure that headings create a logical order. Apply <abbr="Cascading Style Sheets">CSS</abbr> classes to control visual presentation (e.g. <code translate="no">&lt;h2 class=&quot;type-size-medium color-blue-dark&quot;&gt;Our services&lt;/h2&gt;</code> ).</small>
4343
</p>

partials/section.interactive.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<p>We accept cash, Visa, American Express, money orders, and personal checks.</p>
1010
</details>
1111

12-
<h4>Notes:</h4>
12+
<h4 id="notes-details">Notes:</h4>
1313
<p>
1414
<small>The <code translate="no">details</code> element is currently not supported by Microsoft Edge or Internet Explorer. These browsers will <a rel="external noopener" href="https://css-tricks.com/quick-reminder-that-details-summary-is-the-easiest-way-ever-to-make-an-accordion/">display the content in an opened state</a>, as if the <code translate="no">open</code> attribute was applied.</small>
1515
</p>
@@ -24,7 +24,7 @@
2424
</button>
2525
</dialog>
2626

27-
<h4>Notes:</h4>
27+
<h4 id="notes-dialog">Notes:</h4>
2828
<p>
2929
<small>The <code translate="no">dialog</code>'s interactivity needs to be controlled with JavaScript.</small>
3030
</p>

partials/section.project-link.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- Start of #section-project-link -->
2-
<aside id="section-project-link" aria-labelledby="title-project">
2+
<aside id="section-project-link">
33
<a href="https://github.com/ericwbailey/accessible-html-content-patterns">
44
<svg aria-labelledby="project-title project-description" xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 250 250" fill="#ffffff" role="img" style="position: absolute; top: 0; right: 0">
55
<title id="project-title" style="border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px;">View project repository on GitHub</title>

partials/section.table-of-contents.hbs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!-- Start of #section-table-of-contents -->
22
<nav id="section-table-of-contents" aria-labelledby="title-table-of-contents">
3+
<h1>Accessible HTML Content Patterns</h1>
34
<h2 id="title-table-of-contents">Table of Contents</h2>
45

56
<ol>
@@ -16,12 +17,13 @@
1617
</ol>
1718
</li>
1819
<li><a href="#section-tables">Tables</a></li>
19-
<li><a href="#section-interactive">Interactive</a></li>
20+
<li><a href="#section-interactive">Interactive</a>
2021
<ol>
2122
<li><a href="#subsection-details">Details</a></li>
2223
<li><a href="#subsection-dialog">Dialog</a></li>
2324
</ol>
24-
<li><a href="#section-embedded">Embedded</a></li>
25+
</li>
26+
<li><a href="#section-embedded">Embedded</a>
2527
<ol>
2628
<li><a href="#subsection-image">Image</a></li>
2729
<li><a href="#subsection-broken-image">Broken Image</a></li>
@@ -35,6 +37,7 @@
3537
<li><a href="#subsection-object">Object</a></li>
3638
<li><a href="#subsection-canvas">Canvas</a></li>
3739
</ol>
40+
</li>
3841
<li><a href="#section-forms">Forms</a>
3942
<ol>
4043
<li><a href="#subsection-text-input">Text Input</a></li>

partials/section.tables.hbs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,9 @@
8989
</tfoot>
9090
</table>
9191

92-
<h3>Notes:</h3>
92+
<h3 id="notes-tables">Notes:</h3>
9393
<p>
9494
<small>Use <code translate="no">id</code> and <code translate="no">header</code> attributes for tables with complicated markup (colspans, row headers, etc.).</small>
9595
</p>
96-
9796
</section>
9897
<!-- End of #section-tables -->

partials/section.text-level.hbs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
<p>
2323
The French phrase, <cite lang="fr" translate="no">C'est le ton qui fait la chanson</cite>, might apply here.
2424
</p>
25-
<h4>Notes:</h4>
25+
26+
<h4 id="notes-ins-del">Notes:</h4>
2627
<ul>
2728
<li>
2829
<small><code translate="no">&lt;mark&gt;</code>, <code translate="no">&lt;ins&gt;</code>, <code translate="no">&lt;del&gt;</code>, and <code translate="no">&lt;s&gt;</code> elements are not announced by screen readers. Consider <a rel="external noopener" href="https://developer.paciellogroup.com/blog/2017/12/short-note-on-making-your-mark-more-accessible/">using CSS to indicate their presence</a>.</small>
@@ -79,7 +80,7 @@
7980
<li>Blackcurrant</li>
8081
</ul>
8182

82-
<h4>Notes:</h4>
83+
<h4 id="notes-lists">Notes:</h4>
8384
<p>
8485
<small>VoiceOver will not <a rel="external noopener" href="https://unfetteredthoughts.net/2017/09/26/voiceover-and-list-style-type-none/">announce unordered lists properly when either the list-style-type is set to none or display is set to inline</a>.</small>
8586
</p>
@@ -166,7 +167,7 @@ drwxr-xr-x 9 eric staff 306 Mar 24 13:36 .git/
166167
</pre>
167168
</samp>
168169

169-
<h4>Notes:</h4>
170+
<h4 id="notes-code">Notes:</h4>
170171
<p>
171172
<small>Apply <code translate="no">translate="no"</code> to markup that contains code examples to prevent keywords from being automatically translated.</small>
172173
</p>
@@ -191,7 +192,7 @@ drwxr-xr-x 9 eric staff 306 Mar 24 13:36 .git/
191192
<li><span role="definition" aria-label="Not equals">≠</span></li>
192193
</ul>
193194

194-
<h4>Notes:</h4>
195+
<h4 id="notes-symbols">Notes:</h4>
195196
<p>
196197
<small>Certain screen readers will not <a rel="external noopener" href="http://www.deque.com/blog/dont-screen-readers-read-whats-screen-part-1-punctuation-typographic-symbols/">read certain symbols out loud</a>. Use <code translate="no">role="definition"</code> in conjunction with <code translate="no">aria-label</code> to ensure the symbol is read.</small>
197198
</p>
@@ -209,7 +210,7 @@ drwxr-xr-x 9 eric staff 306 Mar 24 13:36 .git/
209210
<li><span role="img" aria-label="Beer emoji">🍺</span></li>
210211
</ul>
211212

212-
<h4>Notes:</h4>
213+
<h4 id="notes-emoji">Notes:</h4>
213214
<p>
214215
<small>Certain screen readers will not <a rel="external noopener" href="http://tink.uk/accessible-emoji/">expose emoji as images in the accessibility treee</a>. Use <code translate="no">role="img"</code> in conjunction with <code translate="no">aria-label</code> to ensure the symbol is read.</small>
215216
</p>

0 commit comments

Comments
 (0)