material-components / material-components-android

Modular and customizable Material Design UI components for Android
Apache License 2.0
16.36k stars 3.07k forks source link

[TextInputLayout] Issues with Talkback interaction #604

Closed kenzieFlick closed 3 years ago

kenzieFlick commented 5 years ago

Description: I have been running into issues surrounding Talkback accessibility and the error message with the TextInputLayout. When Talkback-testing the accessibility of TextInputLayout, which surrounds a TextInputEditText, the TextInputLayout is interacting unusually with Talkback announcements. It announces the validation error message set on the text field whenever a character is being typed or deleted regardless of if the error is active or not.

Expected behavior: Using TextInputLayout in coordination with TextInputEditText should be announcing the character being typed and deleted in Talkback instead of announcing the error message of the text field. It should only announce the error message once on the text field when it is valid, not in multiple successions on any character addition or deletion.

Screenshots: Here it would read "invalid aisle" multiple times as I type or delete a character

Screen Shot 2019-09-16 at 2 03 15 PM

Source code: The code snippet which is causing this issue. Please consider attaching a minimal sample app that reproduces the issue. Layout being used: `<com.google.android.material.textfield.TextInputLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/single_text_input_layout" android:layout_height="wrap_content" android:layout_width="match_parent" app:helperTextEnabled="true" app:errorIconDrawable="@null" style="@style/textFieldLayout">

<com.google.android.material.textfield.TextInputEditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/single_text_input_edit_text"
        style="@style/singleTextFieldEditText"/>

</com.google.android.material.textfield.TextInputLayout>`

Android API version: Marshmallow

Material Library version: 1.1.0-alpha10

Device: Device on which the bug was encountered here: Zebra TC51

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.

kenzieFlick commented 5 years ago

Actually avoided the the error icon by adding app:errorIconDrawable="@null" to the TextInputLayout

ldjcmu commented 5 years ago

Thanks for this report. We'll look into reducing the error verbalization in the case you originally described.

kenzieFlick commented 5 years ago

@ldjcmu Thank you so much!

drchen commented 3 years ago

Is this still an issue?

drchen commented 3 years ago

I'll close this due to no further update. Feel free to reopen it if this is still an issue. : )

harshfast commented 1 year ago

@drchen @kenzieFlick Yes, this is still an issue, how to fix it. Error text is announced on every input.