-
Notifications
You must be signed in to change notification settings - Fork 77
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
Show/Hide Password: Accessibility on the button #508
Show/Hide Password: Accessibility on the button #508
Conversation
yannicka
commented
Jun 13, 2023
•
edited
Loading
edited
Questions | Answers |
---|---|
Description? | Adds accessibility to the button to show/hide the password |
Type? | improvement |
BC breaks? | no |
Deprecations? | no |
Fixed ticket? | Improve #251 |
Sponsor company | N/A |
How to test? | For a dev: Open dev console and sees aria-label and aria-expanded. (tested), for QA: see that showing/hiding password during registration works as expected. |
src/js/visible-password.ts
Outdated
|
||
const icon = button.firstElementChild; | ||
|
||
if (icon) { | ||
icon.innerHTML = newType === 'text' ? 'visibility_off' : 'visibility'; | ||
|
||
const textShow = button.dataset.textShow; | ||
const textHide = button.dataset.textHide; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const textHide = button.dataset.textHide; | |
const { textHide, textShow } = button.dataset; |
that should do it with eslint errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eslint is 🔴
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @yannicka
Thanx for the PR ! LGTM QA ✔️
You can check the attached screen recorder
810beta.1.mp4
Thank you !
Thank you @yannicka ! |