Content description in editable elements
Editable elements such as EditTexts or TextViews should not have a contentDescription property. This ensures that screen readers can accurately navigate, describe, and interact with user-entered text within these elements.
Screen readers are designed to automatically read the text entered in editable fields. Defining a contentDescription property can interfere with this functionality, preventing users from receiving essential feedback about their input.
- Rule Category :
Accessibility Labels - WCAG 2.1 & 2.2 SC :
4.1.2 (A) - Rule Severity :
Serious - Supported Platforms : Native Android apps only
Success criteria
The rule checks for the following potential violations:
-
contentDescriptionin editable elements
Editable fields such asEditTextorTextViewshould not have acontentDescriptionproperty. This property can interfere with the screen reader’s ability to read the entered text.
How to fix
To fix violations related to contentDescription property in Android, follow these steps:
-
Do not use
contentDescription
Do not set acontentDescriptionproperty onEditTextorTextView. -
Use
hintfor accessibility labels
Use thehintproperty to define the editable element’s name and purpose. -
Associate elements using
labelFor
Associate a label with an input field using thelabelForproperty. This ensures the screen reader announces the label alongside the input field.
Example
The following example scan report highlights an input field with a defined contentDescription property. This violation prevents screen readers from reading the text entered in that field.

Fix
To correct this violation:
- Remove the
contentDescriptionproperty. - Add aÂ
hint attribute to theEditTextelement to provide a label. - Alternatively, use the
labelForproperty inTextViewto associate a label with the input field.
References
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!