Skip to main content
No Result Found

View State in element accessibility label

App Accessibility checks if the view state information is included in the accessible name of elements. Screen readers automatically announce an element’s type and state, so including this information can be redundant or even cause conflicts with the view’s current state. Ensuring that accessibility labels do not contain view state information is important for creating a fully accessible and user-friendly app.

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

Success criteria

The rule checks for the following potential violations:

  • Inclusion of State Information
    Accessibility labels should not include information about the element’s state, such as “ON” or “OFF”.
  • Redundant Information
    Accessibility labels should not repeat information that screen readers automatically announce.

How to fix?

To fix violations related to view state information in element accessibility labels, follow these steps:

  • Remove state information
    Ensure that the accessibility labels defined in the contentDescription property (Android) or accessibilityLabel property (iOS) do not contain information about the state of a view.
  • Rely on assistive technologies
    Depend on assistive technologies to automatically convey the element’s type and current state alongside its accessible name. This approach avoids redundancy and ensures that the information presented is always up-to-date and accurate.

Example

In the following example scan report, the alarm element’s accessibility label includes view state information. The alarm set for 06:00 AM includes the state information "tap" in its content description. When a screen reader announces this element, it reads the entire label, including the "tap" state. This is redundant because the screen reader will automatically announce the state of the element.

View State in element accessibility label violation

Fix

  • Remove "tap" from the content description.
  • Ensure the screen reader is allowed to announce the element’s state automatically.

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





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