Accessible input field labels
Screen reader users rely on an input field’s accessible name to understand what data to enter. TalkBack on Android and VoiceOver on iOS read this name aloud. When a label is missing, or when it is a generic value such as editText or field1, screen reader users can’t determine the field’s purpose. This rule checks that every input field has a meaningful, persistent label that accurately describes the expected input, and that apps don’t rely solely on placeholder text, which disappears when the user starts typing.
- Rule Category :
Input Purpose - WCAG 2.1 & 2.2 SC :
1.3.5 (AA),2.4.6 (AA),2.5.3 (A),3.3.2 (A) - RAAM 1.1 :
9.1,9.2,9.3,9.4 - Rule Severity :
Serious - Supported Platforms and Frameworks :
Android,iOS,React Native,Flutter apps
Success criteria
The rule checks for the following potential violations:
- An input field’s accessible name does not meaningfully describe its purpose.
- An input field has no label, placeholder, or value of any kind.
- An input field relies only on placeholder text, such as
hinton Android,placeholderon iOS, orhintTexton Flutter, which disappears once the user starts typing. - An input field label repeats the field’s current value.
AI-powered testing
The BrowserStack AI-powered Issue Detection Agent evaluates whether an input field’s label meaningfully and persistently describes its purpose by conducting a multi-layered semantic analysis:
AI-powered results are clearly marked in the report so you can review and apply suggestions as needed.
The Issue Detection Agent performs the following checks:
-
Detects placeholder-only labels:
- Identifies fields where only a placeholder is present and no persistent label is set, regardless of how descriptive the placeholder text is.
-
Evaluates label meaningfulness in context:
- Reads the field’s surrounding context to assess whether an ambiguous label becomes meaningful in context.
- Identifies if there is a mismatch between the programmatic accessible name and the visible on-screen label, or between the label and the field’s declared input type. For example, a password field labeled Phone number.
- Recognizes a standard icon near a field, such as a search icon, that conveys the field’s purpose. A field whose purpose is clear from a well-known icon isn’t flagged, even without a text label.
- Evaluates labels in multiple languages.
-
Suggests persistent, descriptive labels:
- Generates a label that reflects the field’s purpose and input type.
- When the programmatic label and the visible label differ, the suggestion includes a note to align both.
- When only a placeholder exists, the agent suggests a persistent label, not a replacement placeholder.
For more information, see Issue Detection Agent.
How to fix
You can fix violations manually or by applying the AI-powered fix.
Manual fix
To fix a violation, give the input field a persistent, descriptive label that matches its purpose:
- Replace a generic label such as editText or field1 with a label that describes the expected input, such as Email address or Phone number.
- Replace the placeholder for a field with a persistent visible label that stays visible even after the user begins typing, and associate it programmatically with the input field.
- If the visible label and the programmatic accessible name differ, update both so they are consistent with each other and with the field’s input type.
- If the field’s current value is used as its accessible name, set a descriptive
accessibilityLabelon iOS orcontentDescriptionon Android that describes the field’s purpose instead.
Platform and framework specific fixes
The element that represents an input field, and the attribute that carries its accessible name, vary by platform and framework. Apply the fix for your platform or framework:
- Associate a visible
TextViewlabel with theEditTextusing thelabelForattribute, so the label text becomes the field’s accessible name and stays visible while the user types. - If no paired
TextViewis used, set a descriptivecontentDescriptionon theEditText. Do not use a generic value such aseditTextor a resource ID. - Use
hintonly for placeholder text, not as the label. It disappears once the user starts typing, so always pair it withlabelFororcontentDescription.
- Set a descriptive
accessibilityLabelon theUITextFieldorUITextViewthat describes the field’s purpose. Do not echo the placeholder or the field’s current value. - Alternatively, pair the field with a visible
UILabeland group them in an accessible container, so VoiceOver announces the label together with the field. - Use
placeholderonly for hint text, not as the label. It disappears once the user starts typing, so always provide anaccessibilityLabelor a persistentUILabel.
- Set a descriptive
accessibilityLabelon theTextInputcomponent to provide the accessible name announced by screen readers. - For a persistent visible label, pair the
TextInputwith aTextcomponent and associate them usingnativeIDon theTextandaccessibilityLabelledByon theTextInput. - Use
placeholderonly for hint text, not as the label. It disappears once the user starts typing, so always provide anaccessibilityLabelor an associated visible label.
- Set the
labelTextproperty inInputDecorationon aTextFieldorTextFormField. UnlikehintText,labelTextpersists above the field after the user starts typing. - For a custom field that does not use
InputDecoration, wrap it in aSemanticswidget and set a descriptivelabel. - Use
hintTextonly for placeholder text, not as the label. It disappears once the user starts typing, so always provide a persistentlabelText.
AI-powered fix
You can also use the AI-powered suggestions to ensure that all input fields have meaningful, persistent labels that accurately reflect their purpose.
The AI engine only generates the suggestions. You must manually review and implement the suggestions in your codebase using the steps mentioned in the Manual fix section.
Example
The following example scan report shows accessible input field label violations on the Profile information screen of an iOS app:

Violation
- One field shows the entered text they/them but has no label, so a user relying on a screen reader can’t tell that the field collects pronouns.
- The other field has no descriptive label either. Its only label repeats the entered text Loves trail runs, so a user relying on a screen reader can’t tell that the field is for a short bio.
Fix
- Set a descriptive
accessibilityLabelon each field that states its purpose, such as Pronouns and Bio. - Do not use the user’s entered value as the label.
References
WCAG
- 1.3.5 Identify Input Purpose (Level AA): WCAG 2.1 · WCAG 2.2
- 2.4.6 Headings and Labels (Level AA): WCAG 2.1 · WCAG 2.2
- 2.5.3 Label in Name (Level A): WCAG 2.1 · WCAG 2.2
- 3.3.2 Labels or Instructions (Level A): WCAG 2.1 · WCAG 2.2
RAAM 1.1
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!