uswds / uswds-site

USWDS website and documentation
https://designsystem.digital.gov
Other
187 stars 141 forks source link

Add documentation for "Password" component #1378

Open aduth opened 2 years ago

aduth commented 2 years ago

Description

USWDS includes an implementation for a "Password" component, which is demonstrated on the Sign-in template, but for which there is no dedicated component documentation.

As a developer interested in using this component, it would be useful for there to exist component documentation for this separate from the template example.

Steps to reproduce the issue

  1. Go to https://designsystem.digital.gov/components/overview/
  2. Search "Password"

Expected: Documentation for a "Password" component Actual: "0 components found"

aduth commented 2 years ago

Something to consider for documentation: The current implementation in the Sign In template could be improved, since it uses an anchor tag <a href="javascript:void()"> where a <button> would likely be more appropriate, from both a semantics and accessibility point-of-view.

Related: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#onclick_events