Edit Text Name

This page is not available in the language you requested. You have been redirected to the English version of the page.
Link to this page copied to clipboard
Not for use with personal data

WCAG 2.0 - 1.3.1 A Impact - Serious

EditText elements must have a name and value available to TalkBack.

Supported within:
XML Layouts

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

  1. Turn on TalkBack
  2. Focus on the element
  3. 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.

How to Fix

EditText editText = .......; // Role: EditText
TextView label = .......; // Role: Label
label.setLabelFor(editText.getId()); // Associate the Checkbox with its Name