Skip to content

Commit fb0b8e0

Browse files
committed
Add translate=“no” to code
1 parent 276f9ed commit fb0b8e0

File tree

7 files changed

+30
-24
lines changed

7 files changed

+30
-24
lines changed

partials/section.about.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<h2 id="title__about">About</h2>
33

44
<p>
5-
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>&lt;command&gt;</code> and <code>&lt;menu&gt;</code> tags.
5+
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.
66
</p>
77
<p>
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.

partials/section.embedded.hbs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242
<h3>Notes:</h3>
4343
<ul>
4444
<li>
45-
<small>Be sure to provide values for the <code>height</code> and <code>width</code> attributes so <abbr>SVGs</abbr> won't expand to fill the page if styles don't load.</small>
45+
<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>
4646
</li>
4747
<li>
4848
<small>Different implementations of <abbr>SVG</abbr> have <a rel="external noopener" href="https://css-tricks.com/accessible-svgs/">different approaches for being made accessible</a>.</small>
4949
</li>
5050
<li>
51-
<small>Add whitespace around the <code>use</code> element in a <abbr>SVG</abbr> icon system to <a rel="external noopener" href="http://simplyaccessible.com/article/7-solutions-svgs/#acc-heading-5">prevent a focus bug with Safari 10</a>.</small>
51+
<small>Add whitespace around the <code translate="no">use</code> element in a <abbr>SVG</abbr> icon system to <a rel="external noopener" href="http://simplyaccessible.com/article/7-solutions-svgs/#acc-heading-5">prevent a focus bug with Safari 10</a>.</small>
5252
</li>
5353
</ul>
5454

@@ -98,7 +98,7 @@
9898
label="English"
9999
srclang="en"
100100
kind="captions" />
101-
Your browser does not support the <code>&lt;audio&gt;</code> element.
101+
Your browser does not support the <code translate="no">&lt;audio&gt;</code> element.
102102
Please <a rel="external noopener" href="http://browsehappy.com/">consider upgrading your browser</a> or <a download href="http://www.noiseaddicts.com/samples_1w72b820/4353.mp3">download a file</a> for offline listening.
103103
</audio><!-- End of #subsection__audio -->
104104

@@ -120,13 +120,13 @@
120120
label="English"
121121
srclang="en"
122122
kind="captions" />
123-
Your browser does not support the <code>&lt;video&gt;</code> element.
123+
Your browser does not support the <code translate="no">&lt;video&gt;</code> element.
124124
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.
125125
</video><!-- End of #subsection__video -->
126126

127127
<h3>Notes:</h3>
128128
<p>
129-
<small>Accessibility errors concerning the video's missing audio description should go away once the <code>&lt;track&gt;</code>'s source is linked to a valid caption file.</small>
129+
<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>
130130
</p>
131131

132132
<h3 id="subsection__object">Object</h3><!-- Start of #subsection__object -->
@@ -151,7 +151,7 @@
151151
width="640"
152152
height="390">
153153
</embed>
154-
Your browser does not support the <code>&lt;object&gt;</code> element.
154+
Your browser does not support the <code translate="no">&lt;object&gt;</code> element.
155155
Please <a rel="external noopener" href="http://browsehappy.com/">consider upgrading your browser</a> or <a rel="external noopener" href="https://www.youtube.com/watch?v=pDHzK3Xe7Yw">view the video on YouTube</a>.
156156
</object><!-- End of #subsection__object -->
157157

@@ -160,12 +160,12 @@
160160
id="myCanvas"
161161
width="400"
162162
height="400">
163-
Your browser does not support the <code>&lt;canvas&gt;</code> element.
163+
Your browser does not support the <code translate="no">&lt;canvas&gt;</code> element.
164164
Please <a rel="external noopener" href="http://browsehappy.com/">consider upgrading your browser</a>.
165165
</canvas
166166

167167
<h3>Notes:</h3>
168168
<p>
169-
<small>Add <code>role="presentation"</code> to <code>&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>.
169+
<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>.
170170
</p>><!-- End of #subsection__canvas -->
171171
</section><!-- End of #section__embedded -->

partials/section.forms.hbs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -427,16 +427,16 @@
427427
<h4>Notes:</h4>
428428
<ul>
429429
<li>
430-
<small>Add <code>type="button"</code> to <code>&lt;button&gt;</code> elements placed outside of forms to prevent some browsers from attempting to submit form data.</small>
430+
<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>
431431
</li>
432432
<li>
433-
<small>Add <code>pointer-events: none;</code> to <a rel="external noopener" href="https://twitter.com/stowball/status/857707052545613824">inline SVG icons placed in buttons</a>.</small>
433+
<small>Add <code translate="no">pointer-events: none;</code> to <a rel="external noopener" href="https://twitter.com/stowball/status/857707052545613824">inline SVG icons placed in buttons</a>.</small>
434434
</li>
435435
<li>
436-
<small>Add <code>focusable="false"</code> to SVG inside of a focusable element (links, buttons, etc.) to prevent <a rel="external noopener" href="https://simplyaccessible.com/article/7-solutions-svgs#acc-heading-4">a bug with Internet Explorer</a>.</small>
436+
<small>Add <code translate="no">focusable="false"</code> to SVG inside of a focusable element (links, buttons, etc.) to prevent <a rel="external noopener" href="https://simplyaccessible.com/article/7-solutions-svgs#acc-heading-4">a bug with Internet Explorer</a>.</small>
437437
</li>
438438
<li>
439-
<small>Use <code>tabindex="0"</code> in conjunction with <code>role="button"</code> to ensure that the text button is focusable. Use <code>cursor: pointer;</code> in the CSS to communicate that it is interactable. Learn more about <a rel="external noopener" href="https://css-tricks.com/use-button-element/"><cite>When To Use The Button Element</cite></a>.</small>
439+
<small>Use <code translate="no">tabindex="0"</code> in conjunction with <code translate="no">role="button"</code> to ensure that the text button is focusable. Use <code translate="no">cursor: pointer;</code> in the CSS to communicate that it is interactable. Learn more about <a rel="external noopener" href="https://css-tricks.com/use-button-element/"><cite>When To Use The Button Element</cite></a>.</small>
440440
</li>
441441
</ul>
442442

@@ -621,7 +621,7 @@
621621

622622
<h5>Notes:</h5>
623623
<p>
624-
<small>Use <code>:hover</code>, <code>:focus</code>, and <code>: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>
624+
<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>
625625
</p>
626626
</div><!-- End of #subsection__buttons -->
627627
</fieldset><!-- End of #subsection__states-and-validation -->

partials/section.headings.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@
3838

3939
<h2>Notes:</h2>
4040
<p>
41-
<small>Ensure that headings create a logical order. Apply <abbr="Cascading Style Sheets">CSS</abbr> classes to control visual presentation (e.g. <code>&lt;h2 class=&quot;type-size-medium color-blue-dark&quot;&gt;Our services&lt;/h2&gt;</code> ).</small>
41+
<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>
4242
</p>
4343
</section><!-- End of #section__headings -->

partials/section.interactive.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<h4>Notes:</h4>
1111
<p>
12-
<small>The <code>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>open</code> attribute was applied.</small>
12+
<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>
1313
</p><!-- End of #subsection__details -->
1414

1515
<h3 id="subsection__details">Dialog</h3><!-- Start of #subsection__details -->
@@ -22,6 +22,6 @@
2222

2323
<h4>Notes:</h4>
2424
<p>
25-
<small>The <code>dialog</code>'s interactivity needs to be controlled with JavaScript.</small>
25+
<small>The <code translate="no">dialog</code>'s interactivity needs to be controlled with JavaScript.</small>
2626
</p><!-- End of #subsection__details -->
2727
</section><!-- End of #section__interactive -->

partials/section.tables.hbs

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

9191
<h3>Notes:</h3>
9292
<p>
93-
<small>Use <code>id</code> and <code>header</code> attributes for tables with complicated markup (colspans, row headers, etc.).</small>
93+
<small>Use <code translate="no">id</code> and <code translate="no">header</code> attributes for tables with complicated markup (colspans, row headers, etc.).</small>
9494
</p>
9595

9696
</section><!-- End of #section__tables -->

partials/section.text-level.hbs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
<h4>Notes:</h4>
2424
<ul>
2525
<li>
26-
<small><code>&lt;mark&gt;</code>, <code>&lt;ins&gt;</code>, <code>&lt;del&gt;</code>, and <code>&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>
26+
<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>
2727
</li>
2828
<li>
29-
<small>Use the <code>translate</code> attribute to control <a rel="external noopener" href="https://html.spec.whatwg.org/multipage/dom.html#the-translate-attribute">automatic translation by the browser</a>.</small>
29+
<small>Use the <code translate="no">translate</code> attribute to control <a rel="external noopener" href="https://html.spec.whatwg.org/multipage/dom.html#the-translate-attribute">automatic translation by the browser</a>.</small>
3030
</li>
3131
</ul>
3232
</div><!-- End of #subsection__content -->
@@ -131,13 +131,13 @@
131131
</div><!-- End of #subsection__lists -->
132132
<div id="subsection__code" aria-labelledby="subtitle__code"><!-- Start of #subsection__code -->
133133
<h3 id="subtitle__code">Code</h3>
134-
<code>
134+
<code translate="no">
135135
<pre>
136136
sudo ipfw pipe 1 config bw 256KByte/s
137137
sudo ipfw add 1 pipe 1 src-port 3000
138138
</pre>
139139
</code>
140-
<samp>
140+
<samp translate="no">
141141
<pre>
142142
~/Sites/boilerplate
143143
❦ ☢ ☭ ☂ ♞
@@ -154,6 +154,12 @@ drwxr-xr-x 9 eric staff 306 Mar 24 13:36 .git/
154154
-rw-r--r-- 1 eric staff 58601 Mar 24 11:50 index.html
155155
</pre>
156156
</samp>
157+
158+
<h4>Notes:</h4>
159+
<p>
160+
<small>Apply <code translate="no">translate="no"</code> to markup that contains code examples to prevent keywords from being automatically translated.</small>
161+
</p>
162+
157163
</div><!-- End of #subsection__code -->
158164
<div id="subsection__symbols" aria-labelledby="subtitle__symbols"><!-- Start of #subsection__symbols -->
159165
<h3 id="subtitle__symbols">Symbols</h3>
@@ -174,7 +180,7 @@ drwxr-xr-x 9 eric staff 306 Mar 24 13:36 .git/
174180

175181
<h4>Notes:</h4>
176182
<p>
177-
<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>role="definition"</code> in conjunction with <code>aria-label</code> to ensure the symbol is read.</small>
183+
<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>
178184
</p>
179185

180186
</div><!-- End of #subsection__symbols -->
@@ -190,7 +196,7 @@ drwxr-xr-x 9 eric staff 306 Mar 24 13:36 .git/
190196

191197
<h4>Notes:</h4>
192198
<p>
193-
<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>role="img"</code> in conjunction with <code>aria-label</code> to ensure the symbol is read.</small>
199+
<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>
194200
</p>
195201
</div><!-- End of #subsection__emoji -->
196202
</section><!-- End of #section__text-level -->

0 commit comments

Comments
 (0)