| UI or UX | UI + UX - Authentication secret entry control | UI + UX - Single-line freeform data-entry control | UI + UX - Field-level validation feedback | UI + UX - Form recovery summary |
| UI guidance | Render password entry as a labelled password field that is hidden by default, uses the correct autocomplete purpose, offers a clear show and hide control, disables spellcheck and automatic capitalization, and keeps helper and error text connected to the input. | Render a persistent label, appropriately sized single-line input, optional hint, visible focus state, and nearby error text that is programmatically associated with the field. | Render a labeled field with hint text, field-adjacent error text, invalid styling, preserved value, and corrected state. | Render a top-of-form summary block with heading, linked error list, and matching field-level error messages. |
| UX guidance | Use password input when a user enters an existing secret to sign in, reauthenticate, unlock a protected action, or confirm account ownership. | Use text input for short freeform answers that users can type or paste and that cannot be accurately represented as a fixed option choice. | Help users correct a specific field without losing or re-entering the value they already typed. | Help users recover from one or more submitted-form errors without scanning the entire page. |
| Good UI | A sign-in form has Email and Password fields, the password field uses autocomplete current-password, a Show button, no spellcheck, and an account-details error after failed login. | A reference-name field has a visible label, hint, medium width, focus ring, and error message beneath the hint when submitted empty. | Error text appears next to the field with readable spacing, persistent label, hint text, and the invalid value still visible. | Top-of-form summary with a clear heading, linked error list, and matching inline field messages. |
| Bad UI | A login form uses a normal text field named Password and leaves the secret visible on screen. | The only instruction is placeholder text that disappears when the user starts typing. | Only a red border with no message. | Red banner saying fix errors with no links. |
| Good UX | A user pastes a generated password from a password manager, toggles Show to inspect one character, hides it again, and signs in without the value appearing later in review or history. | A user types or pastes a short reference, submits it, and the interface confirms the stored value without changing their wording. | Validation appears after blur or submit when it helps correction. | After failed submit, focus or reading order makes the summary discoverable before users scan the form. |
| Bad UX | A user cannot paste from a password manager and shortens the password to something easier to type. | Validation fires on the first focus event and blocks typing before the user has had a chance to answer. | Showing errors before users type. | Only showing errors below the fold. |
| Best fit | The user needs to enter an existing password, passphrase, or PIN-like memorized secret. | The answer is short and user-authored. | A single field has a specific correctable problem. | Form submission can produce one or more errors. |
| Avoid when | The value is not a secret, such as a name, email address, account number, search query, reference, or ordinary note. | The answer is a paragraph, comment, address block, or explanation requiring multiple lines. | The main recovery task is finding several errors across a submitted page. | A single local field issue can be corrected before submit without page-level orientation. |
| Required state | Initial hidden state with label, autocomplete purpose, spellcheck off, autocapitalization off, and show control. | Empty untouched state with persistent label and optional hint. | Neutral field with label, hint, and no error. | Neutral form before submit with no summary. |
| Accessibility burden | Use a visible label that names the password purpose, such as Password or Current password. | Associate every text input with a visible label or equivalent accessible name that matches the visible question. | Expose invalid state on the input and connect error text to the field description where possible. | Use a heading and alert behavior that makes the summary discoverable. |
| Common misuse | Using type text for passwords. | Using placeholder text as the only label or instruction. | Showing field errors before users have interacted with the control. | Showing a red banner or toast with no links to the invalid answers. |