Skip to content

Commit 4290fa3

Browse files
authored
Add password input security and decoding="async" notes (#13)
* Add note about `spellcheck="false”` for passwords * Patch version bump * Add `decoding="async”` guidance * Rebuild docs
1 parent f814e7d commit 4290fa3

File tree

5 files changed

+25
-11
lines changed

5 files changed

+25
-11
lines changed

docs/index.html

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ <h3 id="subsection-details">Details</h3>
493493

494494
<h4 id="notes-details">Notes:</h4>
495495
<p>
496-
<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>
496+
<small>The <code translate="no">details</code> element is currently not supported by Internet Explorer. This 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>
497497
</p>
498498
<!-- End of #subsection-details -->
499499

@@ -535,6 +535,7 @@ <h3 id="subsection-lazy-loaded-image">Lazy-loaded Image</h3>
535535
<img
536536
src="http://placehold.it/500x500?text=Lazy-Loaded+Image+Example"
537537
loading="lazy"
538+
decoding="async"
538539
width="500"
539540
height="500"
540541
alt="Lazy-loaded Image" />
@@ -581,11 +582,14 @@ <h3 id="subsection-inline-svg">Inline SVG</h3>
581582

582583
<h3 id="notes-inline-svg">Notes:</h3>
583584
<ul>
585+
<li>
586+
<small>Use <code translate="no">decoding="async"</code> in conjunction with <code translate="no">loading="lazy"</code> for better performance for browsers that support it.</small>
587+
</li>
584588
<li>
585589
<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>
586590
</li>
587591
<li>
588-
<a>Different implementations of <abbr>SVG</abbr> have different approaches for being made accessible. Reference these articles by <a rel="external noopener" href="https://css-tricks.com/accessible-svgs/"></a>Heather Migliorisi</a> and <a rel="external noopener" href="https://www.deque.com/blog/creating-accessible-svgs/">Carie Fisher</a>.</small>
592+
<small>Different implementations of <abbr>SVG</abbr> have different approaches for being made accessible. Reference these articles by <a rel="external noopener" href="https://css-tricks.com/accessible-svgs/">Heather Migliorisi</a> and <a rel="external noopener" href="https://www.deque.com/blog/creating-accessible-svgs/">Carie Fisher</a>.</small></small>
589593
</li>
590594
<li>
591595
<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>
@@ -809,10 +813,13 @@ <h4 id="notes-text-input">Notes:</h4>
809813
<small>Avoid nesting <code translate="no">input</code> elements inside of <code translate="no">label</code> elements for better support for <a rel="external noopener" href="https://www.nuance.com/dragon.html">Dragon Speech Recognition</a>.</small>
810814
</li>
811815
<li>
812-
<small>Add <code translate="no">autocomplete="new-password"</code> to <code>&lt;input&gt;</code> elements with a type of <code translate="no">password</code> to <a rel="external noopener" href="https://twitter.com/mmatuzo/status/1189041007117176832">make supporting browsers suggest secure passwords</a>.</small>
816+
<small>Add <code translate="no">autocomplete="new-password"</code> to <code translate="no">&lt;input&gt;</code> elements with a type of <code translate="no">password</code> to <a rel="external noopener" href="https://twitter.com/mmatuzo/status/1189041007117176832">make supporting browsers suggest secure passwords</a>.</small>
817+
</li>
818+
<li>
819+
<small><code translate="no">&lt;input type="number"&gt;</code> has <a rel="external noopener" href="https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/">numerous issues with Dragon Naturally Speaking and NVDA</a>.</small>
813820
</li>
814821
<li>
815-
<small><code>&lt;input type="number"&gt;</code> has <a rel="external noopener" href="https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/">numerous issues with Dragon Naturally Speaking and NVDA</a>.</small>
822+
<small>Using <code translate="no">&lt;input type="password"&gt;</code> needs to also have <code translate="no">spellcheck="false"</code> declared on it to <a rel="external noopener" href="https://www.otto-js.com/news/article/chrome-and-edge-enhanced-spellcheck-features-expose-pii-even-your-passwords">avoid a security risk</a>.</code></small>
816823
</li>
817824
</ul>
818825
</fieldset>
@@ -883,7 +890,7 @@ <h3 id="subtitle-select">Select</h3>
883890

884891
<h4 id="notes-select">Notes:</h4>
885892
<p>
886-
<small>The <code>optgroup</code> element has <a rel="external noopener"
893+
<small>The <code translate="no">optgroup</code> element has <a rel="external noopener"
887894
href="https://a11ysupport.io/tests/tech__html__select">mixed support with assistive technology</a>.</small>
888895
</p>
889896
</fieldset>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "accessible-html-content-patterns",
33
"description": "A collection of the full HTML5 Doctor Element Index as well as common markup patterns for quick reference.",
44
"homepage": "https://github.com/ericwbailey/accessible-html-content-patterns",
5-
"version": "2.0.1",
5+
"version": "2.0.2",
66
"license": "MIT",
77
"author": "Eric Bailey <[email protected]> (http://ericwbailey.design/)",
88
"contributors": "Scott Doxey <[email protected]> (https://www.scottdoxey.com/)",

partials/section.embedded.hbs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<img
1515
src="http://placehold.it/500x500?text=Lazy-Loaded+Image+Example"
1616
loading="lazy"
17+
decoding="async"
1718
width="500"
1819
height="500"
1920
alt="Lazy-loaded Image" />
@@ -60,11 +61,14 @@
6061

6162
<h3 id="notes-inline-svg">Notes:</h3>
6263
<ul>
64+
<li>
65+
<small>Use <code translate="no">decoding="async"</code> in conjunction with <code translate="no">loading="lazy"</code> for better performance for browsers that support it.</small>
66+
</li>
6367
<li>
6468
<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>
6569
</li>
6670
<li>
67-
<a>Different implementations of <abbr>SVG</abbr> have different approaches for being made accessible. Reference these articles by <a rel="external noopener" href="https://css-tricks.com/accessible-svgs/"></a>Heather Migliorisi</a> and <a rel="external noopener" href="https://www.deque.com/blog/creating-accessible-svgs/">Carie Fisher</a>.</small>
71+
<small>Different implementations of <abbr>SVG</abbr> have different approaches for being made accessible. Reference these articles by <a rel="external noopener" href="https://css-tricks.com/accessible-svgs/">Heather Migliorisi</a> and <a rel="external noopener" href="https://www.deque.com/blog/creating-accessible-svgs/">Carie Fisher</a>.</small></small>
6872
</li>
6973
<li>
7074
<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>

partials/section.forms.hbs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,13 @@
7575
<small>Avoid nesting <code translate="no">input</code> elements inside of <code translate="no">label</code> elements for better support for <a rel="external noopener" href="https://www.nuance.com/dragon.html">Dragon Speech Recognition</a>.</small>
7676
</li>
7777
<li>
78-
<small>Add <code translate="no">autocomplete="new-password"</code> to <code>&lt;input&gt;</code> elements with a type of <code translate="no">password</code> to <a rel="external noopener" href="https://twitter.com/mmatuzo/status/1189041007117176832">make supporting browsers suggest secure passwords</a>.</small>
78+
<small>Add <code translate="no">autocomplete="new-password"</code> to <code translate="no">&lt;input&gt;</code> elements with a type of <code translate="no">password</code> to <a rel="external noopener" href="https://twitter.com/mmatuzo/status/1189041007117176832">make supporting browsers suggest secure passwords</a>.</small>
7979
</li>
8080
<li>
81-
<small><code>&lt;input type="number"&gt;</code> has <a rel="external noopener" href="https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/">numerous issues with Dragon Naturally Speaking and NVDA</a>.</small>
81+
<small><code translate="no">&lt;input type="number"&gt;</code> has <a rel="external noopener" href="https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/">numerous issues with Dragon Naturally Speaking and NVDA</a>.</small>
82+
</li>
83+
<li>
84+
<small>Using <code translate="no">&lt;input type="password"&gt;</code> needs to also have <code translate="no">spellcheck="false"</code> declared on it to <a rel="external noopener" href="https://www.otto-js.com/news/article/chrome-and-edge-enhanced-spellcheck-features-expose-pii-even-your-passwords">avoid a security risk</a>.</code></small>
8285
</li>
8386
</ul>
8487
</fieldset>
@@ -149,7 +152,7 @@
149152

150153
<h4 id="notes-select">Notes:</h4>
151154
<p>
152-
<small>The <code>optgroup</code> element has <a rel="external noopener"
155+
<small>The <code translate="no">optgroup</code> element has <a rel="external noopener"
153156
href="https://a11ysupport.io/tests/tech__html__select">mixed support with assistive technology</a>.</small>
154157
</p>
155158
</fieldset>

partials/section.interactive.hbs

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

1212
<h4 id="notes-details">Notes:</h4>
1313
<p>
14-
<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>
14+
<small>The <code translate="no">details</code> element is currently not supported by Internet Explorer. This 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>
1616
<!-- End of #subsection-details -->
1717

0 commit comments

Comments
 (0)