-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
[docs][TextField][a11y] Dynamically modify the value of the aria-label on the eye button (password field) #44109
Comments
Hi, I'd like to work on this! Just to clarify, the value of the aria-label will be dynamically set depending on the value of the |
Yes exactly. Please open a PR and tag me for review :) |
Could fixing this be a step backward? The rationale goes like this: If I'm blind, this action is irrelevant to me, I can't use the feature. If I'm not blind, then I can see the difference, I don't need specific labels. So it's best to not fix this, to keep the translation work of a i18n team simpler? |
I agree but I imagine a situation where the feature is used by mistake...maybe the user navigates to the button accidentally. It would be helpful for the label to indicate what state the password field is in since you wouldn't want a situation where the password is visible unknown to the user. |
aria-label are only read by screenreaders. Why would someone who use a screen reader ever need this feature? |
How would a blind user then ever be able to read the password (or have it be read by the screen reader?). If I am a sighted user this input allows me to get the password (by reading it), why would a non-sighted user not have that option?
This is bad UX, the feature should be available to everyone. When we say "show" the password, is not just about seeing it, is about reading it, copying etc. |
@mnajdova If screen reader can't read |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. |
@mnajdova Alright, this change makes a lot of sense then, thanks for the screenshot with VoiceOver 👍. |
Steps to reproduce
Link to live example: (required)
Steps:
aria-label
has the same value, although the icon changes (gives indication of sighted users about the two different states)Current behavior
The same
aria-label
value is the same.Expected behavior
In the eye password button, modify dynamically the value of the aria-label on click: aria-label=”display the password” / ”hide the password” instead of using "toggle password visibility" as it does not give indication of the current state.
Context
No response
Your environment
npx @mui/envinfo
Search keywords: textfield, demo
The text was updated successfully, but these errors were encountered: