WCAG 2.5.3 Label in Name — Testing Guide for Mobile & Web Apps

WCAG 2.5.3, "Label in Name," is a Level A success criterion that mandates a straightforward principle: the name of a user interface component must contain the text of its visible label. This applies t

February 15, 2026 · 6 min read · WCAG Guides

Ensuring WCAG 2.5.3: Label in Name Compliance

WCAG 2.5.3, "Label in Name," is a Level A success criterion that mandates a straightforward principle: the name of a user interface component must contain the text of its visible label. This applies to interactive elements like buttons, input fields, links, and custom controls.

What WCAG 2.5.3 Requires

At its core, this criterion means that if a button displays the text "Submit Order," then the programmatic name of that button must also include "Submit Order." This programmatic name is what assistive technologies, such as screen readers, use to identify and announce the element to users. Essentially, the visible text and the accessible name should be consistent.

Why It Matters: User Impact

Adherence to WCAG 2.5.3 directly impacts users who rely on assistive technologies.

This criterion is crucial for meeting legal requirements such as the European Accessibility Act (EAA) and the Americans with Disabilities Act (ADA), which mandate accessible digital experiences for users with disabilities.

Common Violations and Examples

Violations often occur due to developers not fully understanding how assistive technologies interpret UI elements, particularly with custom controls or complex layouts.

#### Mobile App Violations

  1. Icon Buttons Without Text: An "X" icon button to close a modal. Visually, it's clear. Programmatically, if the accessible name is just "Button" or empty, a screen reader user won't know what it does.
  1. Custom Toggle Switches: A switch that visually indicates "On" or "Off" but whose accessible name is simply "Switch."
  1. Input Fields with Missing Labels: A search input field with a magnifying glass icon next to it. The icon might be intended as the label, but if the input field itself doesn't have a programmatic label associated with it (e.g., "Search"), users might not know what to type.

#### Web App Violations

  1. Buttons with Only Icons: A "Save" icon button (e.g., a floppy disk) without any accompanying text.
  1. Links with Ambiguous Text: A "Click here" link within a paragraph. The surrounding text might provide context, but the link's accessible name is only "Click here."
  1. Form Elements Without Clear Labels: A radio button group for selecting a payment method. Each radio button has a label like "Visa," "Mastercard," etc., but the *group* itself lacks a discernible label, or the individual radio buttons are not programmatically linked to their text labels.

How to Test for Compliance

Testing for WCAG 2.5.3 involves checking the visible label against the programmatic name.

#### Manual Testing Steps

  1. Identify Interactive Elements: Focus on buttons, links, input fields, checkboxes, radio buttons, and custom controls.
  2. Observe Visible Labels: Note the text or icon displayed for each element.
  3. Use Accessibility Inspectors:
  1. Compare Labels: Verify that the text announced by the accessibility tool matches the visible text or icon's intended meaning. For icon-only buttons, ensure the accessible name clearly describes the action (e.g., "Close," "Save," "Search").

#### Automated Tools

Several automated tools can help identify violations:

#### Mobile-Specific Considerations

How to Fix Violations

The fix depends on the technology stack and the type of violation.

#### Code Examples

Web (HTML):

Mobile (Android - Kotlin):

Mobile (iOS - Swift):

closeButton.setImage(UIImage(named: "closeIcon"), for: .normal) \

closeButton.accessibilityLabel = "Close"

emailLabel.text = "Email Address" \

emailTextField.accessibilityLabel = "Email Address" (Or use UIAccessibility methods to associate the label)

How SUSA Checks This Criterion

SUSA's autonomous QA platform actively tests for WCAG 2.5.3 compliance during its exploration of your application.

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free