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

[TextInputLayout] HelperText and Talkback compatibility; able to turn off its accessbility on demand #4512

Open
kthieuJHA opened this issue Dec 27, 2024 · 0 comments

Comments

@kthieuJHA
Copy link

Is your feature request related to a problem? Please describe.
When a TextInputLayout has helperText enabled set to true and appropriate texts assigned to the attribute, Talkback reads aloud the helperText on each character input and deletion. When I have it showing, talkback highlights the entire textinputlayout, only reading the helperText but not reading the actual hint nor input of the textinputedittext until an additional swipe to navigate to the field is executed. I've tried making a custom AccessbilityDelegate to work around these default behavior, but I've come across scenario as well where I cannot make the helper text non-accessible like I would on a view element with View.importantForAccessibility attribute.

Describe the solution you'd like
I like the accessbilitydelegate idea I had so I'm keeping it; but to simulate a better talkback experience, I opted to removing helperText entirely when talkback is enabled and using a custom textview for similar effect, but I can switch off its accessibility and add its description to the custom accessibilitydelegate for the textinputlayout. Naturally, this created a few unsavory conditions I had to make to balance between non-talkback and talkback modes; same conditons if not more for error handling.

We also happily accept pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants