You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: I have a TalkBack issue with TextInputLayout + TextInputEditText combo. I have a form type of screen that presents a number of editable fields (some mandatory, some optional) to the user. I’m performing a form validation when the user selects Save action. If the form is not properly filled (e.g. mandatory info missing, field input is too short or otherwise does not fill the requirements) I set the error message on the TextInputLayout and make requestFocus() -call on the first text field that has an error. The TalkBack will then correctly read the error message but the accessibility focus (green box) stays in the element (ToolBar action) that fired the form validation.
To tackle this issue I started experimenting if I could move the accessibility focus on the text field by making this call: inputEdit.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED)
If I make the call on the TextInputEditText, the behavior will change. Now the accessibility focus will move to the view that has focus and error set but the TalkBack reads the hint text set on the TextInputLayout. If I make the call on the TextInputLayout instead, it doesn’t do anything i.e. TalkBack will read the error message but the accessibility focus is not moved.
Expected behavior: There should an easy way (preferably default behavior) to move the accessibility focus and make the TalkBack to read an error message set on the TextInputLayout when the view gets the focus.
Description: I have a TalkBack issue with TextInputLayout + TextInputEditText combo. I have a form type of screen that presents a number of editable fields (some mandatory, some optional) to the user. I’m performing a form validation when the user selects Save action. If the form is not properly filled (e.g. mandatory info missing, field input is too short or otherwise does not fill the requirements) I set the error message on the TextInputLayout and make requestFocus() -call on the first text field that has an error. The TalkBack will then correctly read the error message but the accessibility focus (green box) stays in the element (ToolBar action) that fired the form validation.
To tackle this issue I started experimenting if I could move the accessibility focus on the text field by making this call:
inputEdit.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED)
If I make the call on the TextInputEditText, the behavior will change. Now the accessibility focus will move to the view that has focus and error set but the TalkBack reads the hint text set on the TextInputLayout. If I make the call on the TextInputLayout instead, it doesn’t do anything i.e. TalkBack will read the error message but the accessibility focus is not moved.
Expected behavior: There should an easy way (preferably default behavior) to move the accessibility focus and make the TalkBack to read an error message set on the TextInputLayout when the view gets the focus.
Source code:
`<com.google.android.material.textfield.TextInputLayout
android:id="@+id/productIdLayout"
style="@style/myInputFieldStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/product_id"
app:error="@{product.productIdError}"
app:errorEnabled="true">
Android API version: Android API 28
Material Library version: 1.3.0
Device: Sony Xperia (G8441)
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.
The text was updated successfully, but these errors were encountered: