Resonance Logo

Password Input Toggle

A password field with a show/hide toggle that lets users verify what they have typed, with the button's accessible name updating to reflect the current visibility state.

Demo

Tab to the password field and type a value. Tab to the show/hide button and press Enter or Space to toggle visibility. Observe how the input type and button label change with each activation.

Required

What to Observe

Anatomy

[Anatomy image placeholder — will be added when assets are available]

  1. Password Input — the text field that accepts the user's password, masked by default
  2. Toggle Button — an interactive control that switches the field between masked and visible states
  3. Button Label / Icon — the visual and accessible indicator of the current show or hide state

Accessibility Behavior

Common Mistakes

Why This Matters

Password fields are high-stakes inputs where errors lead to failed logins. When the toggle button has a static or missing label, screen reader users cannot tell whether the password is currently visible or hidden. When focus moves unexpectedly after toggling, keyboard users lose their place. Getting this pattern right reduces friction at a critical point in the user journey and ensures that all users — including those relying on assistive technology — can verify their input confidently.

Accessibility Validation

This component is validated against internal accessibility criteria aligned with WCAG standards, using our internally developed system, Resonance Specs.

To learn more, please contact us.

Code

Reference Implementation