Skip to main content
No Result Found

Label in name

Label in name guideline ensures that the text labels of user interface components match their accessibility label names. This helps maintain accessibility for users who rely on screen readers.

For example, if a button is visually labeled Log in, the accessibility label name should also include Log in so that it can be easily identified and activated by screen readers. When the visual text and accessibility label names do not match, it can lead to confusion and an inaccessible user experience for screen reader users.

  • Rule Category : Accessibility Labels
  • WCAG 2.1 SC : 2.5.3 (A)
  • WCAG 2.2 SC : 2.5.3 (A)
  • Rule Severity : Serious
  • Supported Platforms : Android, iOS

Success criteria

The rule checks for the following potential violations:

  • The accessibility label name of a UI component does not contain the visually presented text.

How to fix?

To prevent label in name violations, ensure the accessibility label contains the text presented visually.

Example

The following example scan report highlights label in name violation. A button is visually labeled as test button, but the accessibility label name (content description) is set as Content description for my button. This violates the label in name guideline because the accessibility label name does not include the exact text that is visually presented.

Label In Name violation

Fix

  • Update the accessibility label name to include the exact text test button.
  • Ensure that the content description is updated to match the visually presented text, such as, contentDescription: test button.

Reference

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

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy Check Circle