-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Internal: b/140829380
If you have a text field with maxLength, such as
TextField(maxLength: 3, decoration: InputDecoration(hintText: "hint text test"))
it behaves poorly in TalkBack.
When I try to navigate to a TextField like this, it focuses only on the 0/3 character count, skipping the input field. The character count reads nicely, announcing "3 characters remaining", but the hintText is not read and it does not indicate that a text field is in focus and can be interacted with. If you double-tap now, it will open the keyboard, but the TalkBack outline is still around the 0/3. I guess this is in some kind of bad initial state.
Now, type some text. When you type the 4th character and exceed the limit, it correctly does not add the character, but it just reads "Showing English (US)(QUERTY) keyboard". I would expect it to provide some indication that the 4th character has been rejected, like "no characters remaining".
Now navigate backwards and then forwards again. Now that the text field has text in it, it reads "Editing, xxx, hint text test, edit box". You can then navigate forwards again to focus on the 3/3, which will properly read "No characters remaining".
If you delete all of the input text, it does not go back into the bad initial state where the screen reader does not see the input field.