-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Describe the bug
The togglemask feature of the Password component is inaccessible via keyboard. I have attempted to use Passthroughs to make it work, but in addition to being very cumbersome (especially that I would have to manage focus since the changing icons loses focus of the current element), others would have to go through the same extended process to have an accessible component. And if they don't have the understanding, it will remain inaccessible.
Pull Request Link
No response
Reason for not contributing a PR
- Lack of time
- Unsure how to implement the fix/feature
- Difficulty understanding the codebase
- Other
Other Reason
I may find time later, but am not super familiar with the code base in order to get up to speed at the moment.
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-crmgt8xd?file=src%2FApp.vue
Environment
Standard node environment, running in WSL 2/Ubuntu.
Vue version
3.4.31
PrimeVue version
4.3.1
Node version
20.19.1
Browser(s)
No response
Steps to reproduce the behavior
- Enter a password in the Password input
- Hit tab to focus the toggle mask icon
- See that the toggle mask icon is not focusable
Expected behavior
To my understanding, it should:
- Wrap the icon(s) with a button
- Listen to a click on that button (instead of the icon).
- Add an aria-label to the button which changes to "show password" or "hide password" depending on the current state.
- Remove the
aria-hidden="true"from the current icon.
This would make it accessible via keyboard (currently only accessible via mouse).