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] All errors are announced when using multiple input fields #2223

Closed
michaelatnab opened this issue May 28, 2021 · 0 comments

Comments

@michaelatnab
Copy link

Description: When there are multiple input fields on a screen and the user presses the "submit" button (which causes error text to be set) and there are multiple errors, the screen reader announces all of the errors.

Expected behaviour: The screen reader should announce only the error for the input that has focus.

Our accessibility team has stated that all errors need to be set but only the one with focus should be announced. Then if/when the user moves focus to another input then it's respective error could be announced at that time only.

They have identified this as a high risk bug which could be very confusing to users. They will not approve this component so we are not able to use it (but would very much like to).

Note: this particular bug does not occur on all devices.

Source code: n/a.

Android API version: 30.

Material Library version: 1.2.1.

Device: It has been observed on Pixel 4a, Pixel 2, and Samsung S9. I could not reproduce on Pixel 3.

To help us triage faster, please check to make sure you are using the latest version of the library.

We also happily accept pull requests.

dsn5ft pushed a commit that referenced this issue Jan 5, 2023
Resolves #2223

Add `TextInputLayout.setErrorAccessibilityLiveRegion` and `TextInputLayout.getErrorAccessibilityLiveRegion` to allow controlling the way the TextInputLayout error is announced.

Example:

```
textInputLayout.setErrorAccessibilityLiveRegion(ViewCompat.ACCESSIBILITY_LIVE_REGION_NONE);
```

PiperOrigin-RevId: 497323465
(cherry picked from commit e1688f3)
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

3 participants