|
20 | 20 |
|
21 | 21 | <label>
|
22 | 22 | 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" /> |
25 | 24 | </label>
|
26 | 25 |
|
27 | 26 | <label>
|
28 | 27 | 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" /> |
31 | 29 | </label>
|
32 | 30 |
|
33 | 31 | <label>
|
|
106 | 104 | <h4 id="notes-text-input">Notes:</h4>
|
107 | 105 | <ul>
|
108 | 106 | <li>
|
109 |
| - <small>Add <code translate="no">autocomplete="new-password"</code> to <code><input></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><input></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> |
113 | 108 | </li>
|
114 | 109 | <li>
|
115 |
| - <small><code><input type="number"></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><input type="number"></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> |
118 | 111 | </li>
|
119 | 112 | </ul>
|
120 | 113 | </fieldset>
|
|
144 | 137 | <h4 id="notes-non-text-input">Notes:</h4>
|
145 | 138 | <p>
|
146 | 139 | <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> |
149 | 141 | </p>
|
150 | 142 | </fieldset>
|
151 | 143 | <!-- End of #subsection-non-text-input -->
|
|
328 | 320 | <h4 id="notes-buttons">Notes:</h4>
|
329 | 321 | <ul>
|
330 | 322 | <li>
|
331 |
| - <small>Add <code translate="no">type="button"</code> to <code translate="no"><button></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"><button></code> elements placed outside of forms to prevent some browsers from attempting to submit form data.</small> |
333 | 324 | </li>
|
334 | 325 | <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> |
338 | 327 | </li>
|
339 | 328 | <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> |
344 | 330 | </li>
|
345 | 331 | <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> |
351 | 333 | </li>
|
352 | 334 | <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> |
356 | 336 | </li>
|
357 | 337 | </ul>
|
358 | 338 | </fieldset>
|
|
396 | 376 |
|
397 | 377 | <h4 id="notes-lockup">Notes:</h4>
|
398 | 378 | <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> |
401 | 380 | </p>
|
402 | 381 | </fieldset>
|
403 | 382 | <!-- End of #subsection-lockup -->
|
|
481 | 460 |
|
482 | 461 | <h5 id="notes-button-states-and-validation">Notes:</h5>
|
483 | 462 | <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> |
490 | 464 | </p>
|
491 | 465 | </div>
|
492 | 466 | <!-- End of #subsection-button-states -->
|
|
512 | 486 |
|
513 | 487 | <label>
|
514 | 488 | 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" /> |
517 | 490 | </label>
|
518 | 491 |
|
519 | 492 | <label>
|
520 | 493 | 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" /> |
523 | 495 | </label>
|
524 | 496 |
|
525 | 497 | <label>
|
526 | 498 | 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" /> |
529 | 500 | </label>
|
530 | 501 |
|
531 | 502 | <label>
|
532 | 503 | 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" /> |
535 | 505 | </label>
|
536 | 506 |
|
537 | 507 | <label>
|
538 | 508 | 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" /> |
541 | 510 | </label>
|
542 | 511 |
|
543 | 512 | <label>
|
|
601 | 570 |
|
602 | 571 | <label>
|
603 | 572 | 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" /> |
606 | 574 | </label>
|
607 | 575 |
|
608 | 576 | <label>
|
609 | 577 | 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" /> |
612 | 579 | </label>
|
613 | 580 |
|
614 | 581 | <label>
|
615 | 582 | 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" /> |
618 | 584 | </label>
|
619 | 585 |
|
620 | 586 | <label>
|
621 | 587 | 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" /> |
624 | 589 | </label>
|
625 | 590 |
|
626 | 591 | <label>
|
627 | 592 | 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" /> |
630 | 594 | </label>
|
631 | 595 |
|
632 | 596 | <label>
|
633 | 597 | 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" /> |
636 | 599 | </label>
|
637 | 600 |
|
638 | 601 | <label>
|
639 | 602 | 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" /> |
642 | 604 | </label>
|
643 | 605 |
|
644 | 606 | <label>
|
645 | 607 | 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" /> |
648 | 609 | </label>
|
649 | 610 |
|
650 | 611 | <label>
|
651 | 612 | 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" /> |
654 | 614 | </label>
|
655 | 615 |
|
656 | 616 | <label>
|
657 | 617 | 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" /> |
660 | 619 | </label>
|
661 | 620 |
|
662 | 621 | <label>
|
663 | 622 | 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" /> |
666 | 624 | </label>
|
667 | 625 |
|
668 | 626 | <label>
|
669 | 627 | 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" /> |
672 | 629 | </label>
|
673 | 630 |
|
674 | 631 | <label>
|
675 | 632 | 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" /> |
678 | 634 | </label>
|
679 | 635 |
|
680 | 636 | <label>
|
681 | 637 | 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" /> |
684 | 639 | </label>
|
685 | 640 |
|
686 | 641 | <label>
|
687 | 642 | 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" /> |
690 | 644 | </label>
|
691 | 645 |
|
692 | 646 | <label>
|
693 | 647 | 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" /> |
696 | 649 | </label>
|
697 | 650 |
|
698 | 651 | <label>
|
699 | 652 | 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" /> |
702 | 654 | </label>
|
703 | 655 |
|
704 | 656 | <label>
|
705 | 657 | 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" /> |
708 | 659 | </label>
|
709 | 660 |
|
710 | 661 | <label>
|
711 | 662 | 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" /> |
714 | 664 | </label>
|
715 | 665 |
|
716 | 666 | <label>
|
|
720 | 670 |
|
721 | 671 | <label>
|
722 | 672 | 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" /> |
725 | 679 | </label>
|
726 | 680 |
|
727 | 681 | <label>
|
|
731 | 685 |
|
732 | 686 | <h4 id="notes-autocomplete">Notes:</h4>
|
733 | 687 | <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> |
737 | 689 | </p>
|
738 | 690 | </fieldset>
|
739 | 691 | <!-- End of #subsection-autocomplete -->
|
|
0 commit comments