Why the little eye icon matters
A patient trying to reach lab results or send a message through your portal types a password into a field that shows only dots. On a phone, with small keys and autocorrect nearby, one slip locks them out and they call the office. A show password button solves that by letting them see what they typed before they press Sign in.
MDN's reference for the password field notes the same thing. Typed characters are hidden, usually replaced by a symbol, and some browsers show the last character briefly while others let the user switch plain text on and off. MDN says both approaches help people check what they typed, which can be particularly difficult on mobile devices.
Where these buttons go wrong
Most portals are built by a software vendor, so your control over the code is limited. You can still check what patients meet. The usual problems are small and easy to describe to the vendor.
- The button is only an eye picture, and a screen reader announces it as button with no name.
- The picture changes but nothing tells a screen reader user whether the password is now visible.
- The button cannot be reached with the Tab key, or it sits after the Sign in button.
- The button is so small that a thumb taps the wrong thing.
Give it a name and a state
The W3C's Name, Role, Value criterion says the name and role of each interface component must be programmatically determinable, and that custom toggles and similar controls should convey their current state and value through HTML and ARIA. A show password button is exactly that: a custom toggle with two states.
| What the button does | What a screen reader should say |
|---|---|
| Password hidden, button offers to reveal it | Show password, toggle button, not pressed |
| Password visible, button offers to hide it | Show password, toggle button, pressed |
| Eye icon with no text name | Button, with nothing to say what it does |
There are two accepted ways to build it. One keeps the same name, Show password, and changes the pressed state. The other swaps the name between Show password and Hide password. Either works if the announcement always matches what the button will do or what has happened. Do not mix them, because a button named Hide password that also announces pressed confuses people.
Keep the sign-in field friendly too
A toggle helps only if the field itself is set up well. MDN lists the autocomplete values for password fields: current-password lets a browser or password manager fill in the saved password, and new-password is for create-account and change-password forms. MDN also says the value off is often ignored because it harms safe password habits. Our guide to portal sign-in that allows a password manager and paste covers that side.
A five-minute test
- 1Open the sign-in page on your phone and tap the show password button. Confirm the text appears and the button's look changes.
- 2On a computer, press Tab until the focus ring lands on the button. It should be reachable and visible, as in our keyboard-only test.
- 3Turn on a screen reader and move to the button. Listen for a name and, after pressing it, a changed state.
- 4Tap the button with your thumb while holding the phone in one hand. If you miss it, it is too small, so see the tap target guide.
If the portal belongs to a vendor, send them the table above and ask for the name and state to be fixed. Most vendors can change a label faster than a layout. This is a practical check, not legal advice, and no password or patient detail should ever be shared while testing.
Frequently asked questions
Is a show password button safe for patients?
It lets the patient see what they typed, so it helps most when they are alone, as on a personal phone. The patient chooses when to reveal it, and it hides again on request. The sign-in page must still load over a secure connection.
Should the button say Show password or Hide password?
Either works if you stay consistent. One approach keeps the name Show password and announces a pressed state. The other swaps the name each time. What fails is an icon with no name, because a screen reader user cannot tell what it does.
Does a show password button replace a password manager?
No. They solve different problems. The toggle checks typing, while a password manager fills the field. Set the field to current-password so managers can work, and offer the toggle for patients who type by hand.
Who changes this if our portal belongs to a vendor?
The vendor does. Send them the name and state table and ask for a date. Ask a second person to test it on a phone and with a screen reader after the change, so the fix is confirmed.
Can I test this without special software?
Yes. Tap the button on a phone and press Tab on a computer. Phones and computers include a built-in screen reader, so you can also listen for the name and the changed state with no download.
Sources
- MDN Web Docs — The HTML input type password
- W3C Web Accessibility Initiative — Understanding Success Criterion 4.1.2: Name, Role, Value