Skip to content

Commit e453d32

Browse files
committed
1 parent 06dfbc5 commit e453d32

File tree

1 file changed

+43
-91
lines changed

1 file changed

+43
-91
lines changed

partials/section.forms.hbs

Lines changed: 43 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@
2020

2121
<label>
2222
Email
23-
<input id="input-email" name="email" placeholder="[email protected]" autocapitalize="off" autocorrect="off"
24-
spellcheck="false" type="email" />
23+
<input id="input-email" name="email" placeholder="[email protected]" autocapitalize="off" autocorrect="off" spellcheck="false" type="email" />
2524
</label>
2625

2726
<label>
2827
Password
29-
<input id="input-password" name="password" autocapitalize="off" autocorrect="off" spellcheck="false"
30-
type="password" />
28+
<input id="input-password" name="password" autocapitalize="off" autocorrect="off" spellcheck="false" type="password" />
3129
</label>
3230

3331
<label>
@@ -106,15 +104,10 @@
106104
<h4 id="notes-text-input">Notes:</h4>
107105
<ul>
108106
<li>
109-
<small>Add <code translate="no">autocomplete="new-password"</code> to <code>&lt;input&gt;</code> elements with
110-
a type of <code translate="no">password</code> to <a rel="external noopener"
111-
href="https://twitter.com/mmatuzo/status/1189041007117176832">make supporting browsers suggest secure
112-
passwords</a>.</small>
107+
<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>
113108
</li>
114109
<li>
115-
<small><code>&lt;input type="number"&gt;</code> has <a rel="external noopener"
116-
href="https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/">numerous
117-
issues with Dragon Naturally Speaking and NVDA</a>.</small>
110+
<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>
118111
</li>
119112
</ul>
120113
</fieldset>
@@ -144,8 +137,7 @@
144137
<h4 id="notes-non-text-input">Notes:</h4>
145138
<p>
146139
<small>Some pointers on <a rel="external noopener"
147-
href="https://css-tricks.com/sliding-nightmare-understanding-range-input/">styling the range
148-
input</a>.</small>
140+
href="https://css-tricks.com/sliding-nightmare-understanding-range-input/">styling the range input</a>.</small>
149141
</p>
150142
</fieldset>
151143
<!-- End of #subsection-non-text-input -->
@@ -328,31 +320,19 @@
328320
<h4 id="notes-buttons">Notes:</h4>
329321
<ul>
330322
<li>
331-
<small>Add <code translate="no">type="button"</code> to <code translate="no">&lt;button&gt;</code> elements
332-
placed outside of forms to prevent some browsers from attempting to submit form data.</small>
323+
<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>
333324
</li>
334325
<li>
335-
<small>Add <code translate="no">pointer-events: none;</code> to <a rel="external noopener"
336-
href="https://twitter.com/stowball/status/857707052545613824">inline SVG icons placed in
337-
buttons</a>.</small>
326+
<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>
338327
</li>
339328
<li>
340-
<small>Add <code translate="no">focusable="false"</code> to SVG inside of a focusable element (links, buttons,
341-
etc.) to prevent <a rel="external noopener"
342-
href="https://simplyaccessible.com/article/7-solutions-svgs#acc-heading-4">a bug with Internet
343-
Explorer</a>.</small>
329+
<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>
344330
</li>
345331
<li>
346-
<small>Use <code translate="no">tabindex="0"</code> in conjunction with <code
347-
translate="no">role="button"</code> to ensure that the text button is focusable. Use <code
348-
translate="no">cursor: pointer;</code> in the CSS to communicate that it is interactable. Learn more about
349-
<a rel="external noopener" href="https://css-tricks.com/use-button-element/"><cite>When To Use The Button
350-
Element</cite></a>.</small>
332+
<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>
351333
</li>
352334
<li>
353-
<small>Use <code
354-
translate="no"><a href="https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-enterkeyhint-attribute">enterkeyhint</a></code>
355-
to manipulate the enter key on a virtual keyboard.</small>
335+
<small>Use <code translate="no"><a href="https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-enterkeyhint-attribute">enterkeyhint</a></code> to manipulate the enter key on a virtual keyboard.</small>
356336
</li>
357337
</ul>
358338
</fieldset>
@@ -396,8 +376,7 @@
396376

397377
<h4 id="notes-lockup">Notes:</h4>
398378
<p>
399-
<small>Place messaging above the input field so as to not be lost when magnification or focus on mobile
400-
occurs.</small>
379+
<small>Place messaging above the input field so as to not be lost when magnification or focus on mobile occurs.</small>
401380
</p>
402381
</fieldset>
403382
<!-- End of #subsection-lockup -->
@@ -481,12 +460,7 @@
481460

482461
<h5 id="notes-button-states-and-validation">Notes:</h5>
483462
<p>
484-
<small>Use <code translate="no">:hover</code>, <code translate="no">:focus</code>, and <code
485-
translate="no">:active</code> selectors to control the other button states. Learn more about <a
486-
rel="external noopener" href="https://css-tricks.com/user-facing-state/">semantically managing state</a>
487-
and using <a rel="external noopener"
488-
href="https://medium.com/eightshapes-llc/buttons-in-design-systems-eac3acf7e23#.b1p96hsrw"><cite>Buttons
489-
in Design Systems</cite></a>.</small>
463+
<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>
490464
</p>
491465
</div>
492466
<!-- End of #subsection-button-states -->
@@ -512,32 +486,27 @@
512486

513487
<label>
514488
Honorific Prefix (Mr., Ms., Dr., etc.)
515-
<input id="input-autocomplete-honorific-prefix" name="autocomplete-honorific-prefix"
516-
autocomplete="honorific-prefix" autocapitalize="on" type="text" />
489+
<input id="input-autocomplete-honorific-prefix" name="autocomplete-honorific-prefix" autocomplete="honorific-prefix" autocapitalize="on" type="text" />
517490
</label>
518491

519492
<label>
520493
Additional Name
521-
<input id="input-autocomplete-additional-name" name="autocomplete-additional-name"
522-
autocomplete="additional-name" autocorrect="off" type="text" />
494+
<input id="input-autocomplete-additional-name" name="autocomplete-additional-name" autocomplete="additional-name" autocorrect="off" type="text" />
523495
</label>
524496

525497
<label>
526498
Family Name
527-
<input id="input-autocomplete-family-name" name="autocomplete-family-name" autocomplete="family-name"
528-
autocorrect="off" type="text" />
499+
<input id="input-autocomplete-family-name" name="autocomplete-family-name" autocomplete="family-name" autocorrect="off" type="text" />
529500
</label>
530501

531502
<label>
532503
Honorific Suffix (Jr., II, etc.)
533-
<input id="input-autocomplete-honorific-suffix" name="autocomplete-honorific-suffix"
534-
autocomplete="honorific-suffix" autocapitalize="on" type="text" />
504+
<input id="input-autocomplete-honorific-suffix" name="autocomplete-honorific-suffix" autocomplete="honorific-suffix" autocapitalize="on" type="text" />
535505
</label>
536506

537507
<label>
538508
Nickname
539-
<input id="input-autocomplete-nickname" name="autocomplete-nickname" autocomplete="nickname" autocorrect="off"
540-
type="text" />
509+
<input id="input-autocomplete-nickname" name="autocomplete-nickname" autocomplete="nickname" autocorrect="off" type="text" />
541510
</label>
542511

543512
<label>
@@ -601,116 +570,97 @@
601570

602571
<label>
603572
Country Name
604-
<input id="input-autocomplete-country-name" name="autocomplete-country-name" autocomplete="country-name"
605-
type="text" />
573+
<input id="input-autocomplete-country-name" name="autocomplete-country-name" autocomplete="country-name" type="text" />
606574
</label>
607575

608576
<label>
609577
Postal Code
610-
<input novalidate id="input-autocomplete-postal-code" name="autocomplete-postal-code"
611-
autocomplete="shipping postal-code" autocorrect="off" type="number" />
578+
<input novalidate id="input-autocomplete-postal-code" name="autocomplete-postal-code" autocomplete="shipping postal-code" autocorrect="off" type="number" />
612579
</label>
613580

614581
<label>
615582
CC Name (Full name as given on the payment instrument)
616-
<input id="input-autocomplete-cc-name" name="autocomplete-cc-name" autocomplete="cc-name" autocorrect="off"
617-
type="text" />
583+
<input id="input-autocomplete-cc-name" name="autocomplete-cc-name" autocomplete="cc-name" autocorrect="off" type="text" />
618584
</label>
619585

620586
<label>
621587
CC Given Name
622-
<input id="input-autocomplete-cc-given-name" name="autocomplete-cc-given-name" autocomplete="cc-given-name"
623-
autocorrect="off" type="text" />
588+
<input id="input-autocomplete-cc-given-name" name="autocomplete-cc-given-name" autocomplete="cc-given-name" autocorrect="off" type="text" />
624589
</label>
625590

626591
<label>
627592
CC Additional Name
628-
<input id="input-autocomplete-cc-additional-name" name="autocomplete-cc-additional-name"
629-
autocomplete="cc-additional-name" autocorrect="off" type="text" />
593+
<input id="input-autocomplete-cc-additional-name" name="autocomplete-cc-additional-name" autocomplete="cc-additional-name" autocorrect="off" type="text" />
630594
</label>
631595

632596
<label>
633597
CC Family Name
634-
<input id="input-autocomplete-cc-family-name" name="autocomplete-cc-family-name" autocomplete="cc-family-name"
635-
autocorrect="off" type="text" />
598+
<input id="input-autocomplete-cc-family-name" name="autocomplete-cc-family-name" autocomplete="cc-family-name" autocorrect="off" type="text" />
636599
</label>
637600

638601
<label>
639602
CC Number
640-
<input novalidate id="input-autocomplete-cc-number" name="autocomplete-cc-number" pattern="\d*"
641-
autocomplete="cc-number" autocorrect="off" type="tel" />
603+
<input novalidate id="input-autocomplete-cc-number" name="autocomplete-cc-number" pattern="\d*" autocomplete="cc-number" autocorrect="off" type="tel" />
642604
</label>
643605

644606
<label>
645607
CC Exp
646-
<input novalidate id="input-autocomplete-cc-exp" name="autocomplete-cc-exp" pattern="\d*" autocomplete="cc-exp"
647-
autocorrect="off" type="tel" />
608+
<input novalidate id="input-autocomplete-cc-exp" name="autocomplete-cc-exp" pattern="\d*" autocomplete="cc-exp" autocorrect="off" type="tel" />
648609
</label>
649610

650611
<label>
651612
CC Exp Month
652-
<input novalidate id="input-autocomplete-cc-exp-month" name="autocomplete-cc-exp-month" pattern="\d*"
653-
autocomplete="cc-exp-month" autocorrect="off" type="tel" />
613+
<input novalidate id="input-autocomplete-cc-exp-month" name="autocomplete-cc-exp-month" pattern="\d*" autocomplete="cc-exp-month" autocorrect="off" type="tel" />
654614
</label>
655615

656616
<label>
657617
CC Exp Year
658-
<input novalidate id="input-autocomplete-cc-exp-year" name="autocomplete-cc-exp-year" pattern="\d*"
659-
autocomplete="cc-exp-year" autocorrect="off" type="tel" />
618+
<input novalidate id="input-autocomplete-cc-exp-year" name="autocomplete-cc-exp-year" pattern="\d*" autocomplete="cc-exp-year" autocorrect="off" type="tel" />
660619
</label>
661620

662621
<label>
663622
CC CSC (Security code)
664-
<input novalidate id="input-autocomplete-cc-csc" name="autocomplete-cc-csc" pattern="\d*" autocomplete="cc-csc"
665-
autocorrect="off" type="tel" />
623+
<input novalidate id="input-autocomplete-cc-csc" name="autocomplete-cc-csc" pattern="\d*" autocomplete="cc-csc" autocorrect="off" type="tel" />
666624
</label>
667625

668626
<label>
669627
CC Type (Visa, American Express, etc.)
670-
<input id="input-autocomplete-cc-type" name="autocomplete-cc-type" autocomplete="cc-type" autocapitalize="on"
671-
type="text" />
628+
<input id="input-autocomplete-cc-type" name="autocomplete-cc-type" autocomplete="cc-type" autocapitalize="on" type="text" />
672629
</label>
673630

674631
<label>
675632
Transaction Currency
676-
<input id="input-autocomplete-transaction-currency" name="autocomplete-transaction-currency"
677-
autocomplete="transaction-currency" autocapitalize="on" type="text" />
633+
<input id="input-autocomplete-transaction-currency" name="autocomplete-transaction-currency" autocomplete="transaction-currency" autocapitalize="on" type="text" />
678634
</label>
679635

680636
<label>
681637
Transaction Amount
682-
<input id="input-autocomplete-transaction-amount" name="autocomplete-transaction-amount" pattern="\d*"
683-
autocomplete="transaction-amount" type="number" />
638+
<input id="input-autocomplete-transaction-amount" name="autocomplete-transaction-amount" pattern="\d*" autocomplete="transaction-amount" type="number" />
684639
</label>
685640

686641
<label>
687642
Language (Valid BCP 47 language tag)
688-
<input id="input-autocomplete-language" name="autocomplete-language" autocomplete="language" autocapitalize="on"
689-
autocorrect="off" type="text" />
643+
<input id="input-autocomplete-language" name="autocomplete-language" autocomplete="language" autocapitalize="on" autocorrect="off" type="text" />
690644
</label>
691645

692646
<label>
693647
Bday
694-
<input id="input-autocomplete-bday" name="autocomplete-bday" autocomplete="bday" autocapitalize="on"
695-
type="text" />
648+
<input id="input-autocomplete-bday" name="autocomplete-bday" autocomplete="bday" autocapitalize="on" type="text" />
696649
</label>
697650

698651
<label>
699652
Bday-day
700-
<input id="input-autocomplete-bday-day" name="autocomplete-bday-day" pattern="\d*" autocomplete="bday-day"
701-
type="tel" />
653+
<input id="input-autocomplete-bday-day" name="autocomplete-bday-day" pattern="\d*" autocomplete="bday-day" type="tel" />
702654
</label>
703655

704656
<label>
705657
Bday-month
706-
<input id="input-autocomplete-bday-month" name="autocomplete-bday-month" pattern="\d*" autocomplete="bday-month"
707-
type="tel" />
658+
<input id="input-autocomplete-bday-month" name="autocomplete-bday-month" pattern="\d*" autocomplete="bday-month" type="tel" />
708659
</label>
709660

710661
<label>
711662
Bday-year
712-
<input id="input-autocomplete-bday-year" name="autocomplete-bday-year" pattern="\d*" autocomplete="bday-year"
713-
type="tel" />
663+
<input id="input-autocomplete-bday-year" name="autocomplete-bday-year" pattern="\d*" autocomplete="bday-year" type="tel" />
714664
</label>
715665

716666
<label>
@@ -720,8 +670,12 @@
720670

721671
<label>
722672
Autocomplete URL
723-
<input id="input-autocomplete-url" name="autocomplete-url" autocomplete="url" autocapitalize="off"
724-
autocorrect="off" spellcheck="false" type="url" />
673+
<input id="input-autocomplete-url" name="autocomplete-url" autocomplete="url" autocapitalize="off" autocorrect="off" spellcheck="false" type="url" />
674+
</label>
675+
676+
<label>
677+
One-time Code
678+
<input id="input-one-time-code" name="one-time-code" autocomplete="one-time-code" autocapitalize="off" autocorrect="off" spellcheck="false" type="number" />
725679
</label>
726680

727681
<label>
@@ -731,9 +685,7 @@
731685

732686
<h4 id="notes-autocomplete">Notes:</h4>
733687
<p>
734-
<small>Be sure to reference the <a rel="external noopener"
735-
href="http://spaceninja.com/2015/12/08/falsehoods-programmers-believe/"><cite>Falsehoods Programmers
736-
Believe</cite></a> collection for creating bulletproof inputs.</small>
688+
<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>
737689
</p>
738690
</fieldset>
739691
<!-- End of #subsection-autocomplete -->

0 commit comments

Comments
 (0)