Edit Text Name
EditText
elements must have a name and value available to TalkBack.
Supported within:
Impact
Issues found by this rule impact people with blindness.
EditText
elements should provide information where the Android OS expects. As a result, assistive technologies can communicate information predictably.
Confirmation
- Turn on TalkBack
- Focus on the element
- One of the following will happen:
- Accessible: TalkBack announces the entered text, for, and the associated labels
Text
. - Inaccessible: TalkBack either didn't read the above information, or it was announced in the wrong order.
- Accessible: TalkBack announces the entered text, for, and the associated labels
How to Fix
EditText editText = .......; // Role: EditText
TextView label = .......; // Role: Label
label.setLabelFor(editText.getId()); // Associate the Checkbox with its Name