Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(accessibility): add password reveal button #1752

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

SGrueber
Copy link
Collaborator

@SGrueber SGrueber commented Feb 14, 2025

PR Type

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] CI-related changes
[ ] Documentation content changes
[ ] Application / infrastructure changes
[ ] Other:

What Is the Current Behavior?

Making password fields accessible is crucial for ensuring that all users, including those with disabilities, can securely interact with web forms. Sometimes users may want to see the password they are typing.
Currently there is no mechanism for form password fields (unless some modern browsers have already included such mechanism) to confirm the intended password is typed correctly. This is especially problematic for accessibility reasons:
- Screen readers can’t read password hidden text,
- Some people may have memory or cognitive issues,
- Those experiencing hand tremors are more likely to make typing mistakes,
- And so on.

Issue Number: Closes #

What Is the New Behavior?

A button to toggle password visibility has been added for desktop and larger touch devices that can help improve accessibility for users with visual impairments.
This password reveal button to display or hide the password for formly password fields follows the Microsoft Edge guidelines..
The button is available for the formly field types 'ish-password-field' and 'ish-password-novalidate-field'.
Use the new formly field type ish-password-novalidate-field instead of the ish-text-input-field with type="password" if you want to define a password field without the password validator but with a reveal button (e.g. for password fields on the login form or password confirmation fields).
For security reasons the reveal button is only available after the user has entered the first character into the field and
will be hidden after the user moves focus outside the field.
The formly 'ish-input-text-field' field with type="password" will still be supported but does not contain the password reveal button.
Smaller touch devices do not have a password reveal button because these devices often already have a mechanism to show the entered password to the user.

Does this PR Introduce a Breaking Change?

[ ] Yes
[x] No

Other Information

AB#104007

…ssword component and update error indicators (#1694)

* Add functionality to toggle password visibility for password fields.
* Replace TextInputFieldComponent with PasswordFieldComponent to provide password-specific functionality.
* Update error field indicator from "x" to "!" for improved clarity and accessibility.

BREAKING CHANGES: The TextInputFieldComponent is no longer used for password fields. Instead, the PasswordFieldComponent is now used, which includes functionality to toggle password visibility. Password validators are applied to each instance as needed.
@SGrueber SGrueber self-assigned this Feb 14, 2025
@SGrueber SGrueber force-pushed the feat/password_reveal_button branch from 6a07745 to 7816a3c Compare February 14, 2025 13:10
Copy link

Azure Demo Servers are available:

@SGrueber SGrueber force-pushed the feat/password_reveal_button branch from 7816a3c to 303a0d0 Compare February 14, 2025 16:07
@SGrueber SGrueber added this to the 5.3 milestone Feb 14, 2025
@SGrueber SGrueber added enhancement Enhancement to an existing feature refactoring Refactoring of current code labels Feb 14, 2025
@shauke shauke modified the milestones: 5.3, 6.0 Feb 14, 2025
iwiederhold
iwiederhold previously approved these changes Feb 17, 2025
Copy link

Azure Demo Servers are available:

@SGrueber SGrueber requested a review from iwiederhold February 18, 2025 13:30
@SGrueber SGrueber force-pushed the feat/password_reveal_button branch from 0c8de48 to 44b906c Compare February 18, 2025 15:09
Copy link

Azure Demo Servers are available:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to an existing feature refactoring Refactoring of current code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants