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: add password-field using slotted input #2275

Merged
merged 4 commits into from
Aug 9, 2021
Merged

Conversation

web-padawan
Copy link
Member

@web-padawan web-padawan commented Jul 27, 2021

Description

This PR adds @vaadin/password-field base class, Lumo and Material theme, and visual tests.

Fixes #2190

Type of change

  • Feature

@web-padawan web-padawan added the a11y Accessibility issue label Jul 27, 2021
@fhdhsni fhdhsni self-requested a review August 4, 2021 08:00
@web-padawan web-padawan marked this pull request as ready for review August 5, 2021 13:44
@fhdhsni
Copy link

fhdhsni commented Aug 6, 2021

When you reveal the password and then you focus on the input to change it, it goes back to the hidden state. Also focus out hides the password again. Both seems like a bad UX IMO.

The first one is also an a11y issue since screen readers can't read the password which defeats the purpose of revealing it in the first place.

nit: I think the reveal button also doesn't convey enough info when you toggle it, it's announced "selected" when you select it and nothing we you deselect it (VoiceOver). SR users might understand it, but we can also provide additional info like here. The snippet is from this blog post

@web-padawan
Copy link
Member Author

Some comments from the archived Tetralogical helpdesk channel in Slack where the prototype was discussed:

We recommend keeping the aria-label consistent, so just "Show password". This way, the label is consistently announced, followed by the pressed/not pressed state which then accurately reflects to the user what is going on

Moving the focus back to the input may be unexpected/confusing for assistive technology users. Leaving the focus where it is should then obviate the issue of announcements overlapping/clashing

@web-padawan
Copy link
Member Author

@fhdhsni Created a separate issue to discuss and implement your suggestion: #2308

@web-padawan
Copy link
Member Author

When you reveal the password and then you focus on the input to change it, it goes back to the hidden state.

This is now fixed as mentioned here #2275 (comment), thanks to @sissbruecker and @fhdhsni for reporting.

@sonarcloud
Copy link

sonarcloud bot commented Aug 9, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@web-padawan web-padawan merged commit 4a94e11 into master Aug 9, 2021
@web-padawan web-padawan deleted the feat/password-field branch August 9, 2021 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Accessibility issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add password-field base class using new mixins
3 participants