We'd like to set Google Analytics cookies to learn how people use the Knowledge Base, so we can improve it. We set them only if you accept.

Skip to main content
Digital Accessibility Knowledge Base

visible-labels

Mobile validation

Every input field needs a visible label that clearly states its purpose.

Provide a visible, persistent label for every input field, such as text fields, checkboxes, switches, and sliders. Place the label close to its field, so users can easily perceive the relationship between them, including people who use a screen magnifier and see only part of the screen at a time. Place labels directly above text fields, and in line with checkboxes and switches. Don't rely on a placeholder as the label. It disappears as soon as users type, which leaves them unsure of the field's purpose, and is especially hard for people with cognitive disabilities.

Pass Patterns

Text fields with visible labels

Three text fields with visible labels. “Email Address” is directly above its field, which also has a placeholder showing an example address. “Full Name” is directly above its field. “Home Address” is directly to the left of its field.

Checkboxes with labels close to them

Three checkboxes labeled Apple, Banana, and Avocado. Each label is placed close to its checkbox, so the relationship between them is clear.

iOS

A visible label, “Volume”, is placed above the slider.

Swift
let volumeLabel = UILabel()
volumeLabel.text = "Volume"


let volumeSlider = UISlider()
volumeSlider.minimumValue = 0
volumeSlider.maximumValue = 100
volumeSlider.accessibilityLabel = "Volume"


let stack = UIStackView(arrangedSubviews: [volumeLabel, volumeSlider])
stack.axis = .vertical
view.addSubview(stack)

Cross Platform

A visible label, “Volume”, is placed above the slider.

Dart
child: MergeSemantics(
  child: Semantics(
    label: 'Volume',
    child: Slider(
      value: _volume,
      max: 100,
      onChanged: (value) => setState(() => _volume = value),
    ),
  ),
),

Fail Patterns

Text fields without close, persistent labels

Two text fields. The first has only a placeholder and no visible label; a placeholder alone is not a valid label. The second has a visible label, but it is placed far above the field, so the relationship between them is not clear.

Checkboxes far from their labels

Three checkboxes labeled Apple, Banana, and Avocado. Each label is placed far from its checkbox, so screen magnifier users may have difficulty relating the label to the checkbox.

iOS

The slider has an accessibilityLabel for assistive technologies, but no visible label on the screen.

Swift
let volumeSlider = UISlider()
volumeSlider.minimumValue = 0
volumeSlider.maximumValue = 100
volumeSlider.accessibilityLabel = "Volume"
view.addSubview(volumeSlider)

Cross Platform

The slider has no visible label on the screen.

Dart
child: MergeSemantics(
  child: Semantics(
    label: 'Volume',
    child: Slider(
      value: _volume,
      max: 100,
      onChanged: (value) => setState(() => _volume = value),
    ),
  ),
),

Try It Yourself

Checking the labels

  1. Check each input field on the screen for a visible label.
  2. Enter a value in each text field, and check that its label is still visible.
  3. Check that each label is close to its field: directly above text fields, and in line with checkboxes and switches.

Expected results: Every input field has a visible label that stays on screen and is placed close to the field.

Actual results: A field has no visible label, relies on a placeholder that disappears, or has a label placed far from it.

Using a screen magnifier

  1. Turn on Zoom on iOS, or Magnification on Android.
  2. Zoom in, and move across the screen to each input field.

Expected results: Each field and its label appear together in the magnified view.

Actual results: You need to move the magnified view to find the label of a field, or cannot tell which label belongs to which field.

FAQ

How does this issue relate to 3.3.2 Labels or Instructions?

SC 3.3.2 requires labels or instructions when content requires user input. When a field has no visible label, relies on a placeholder that disappears while typing, or has a label too far away to relate to it, users cannot reliably tell what to enter, so the criterion is not met.

Why is this issue marked as Moderate?

Missing or distant labels make fields hard to understand and lead to errors, such as entering the wrong data or skipping required fields. The impact is greatest for people who use a screen magnifier and people with cognitive disabilities. Users can usually still complete the form with extra effort, so it is rated moderate.

Standards and Regulations

StandardSuccess CriterionReference
WCAG 2.23.3.2 Labels or Instructions (A)Labels or instructions are provided when content requires user input.
EN 301 54911.3.3.2 Labels or InstructionsSame as the WCAG text.

Personas impacted by this issue

Learn More