Nested Element Name

Link to Nested Element Name copied to clipboard
Free Trial
note

This is an experimental rule, and therefore its result(s) are considered to be in beta testing. Learn more about experimental rules and how you can help improve them.

WCAG 2.0 - 1.3.2 A Impact - Critical

All text within an accessibility element should be available to TalkBack.

Supported within:
Compose Layouts

Impact

People using TalkBack are most impacted. Developers may add paragraphs of text to a container accessibility element, but TalkBack may not read all text within the container. Hence, people using TalkBack may not be aware of all on-screen text.

Confirmation

  1. Turn on TalkBack
  2. Focus on the accessibility element containing the text
  3. One of the following will happen:
    • Inaccessible: TalkBack will not read the text.
    • Accessible: TalkBack will read all text contained within the focus box.

How to Fix

Avoid marking Compose Text elements as invisibleToUser. Views that people can access without assistive technology should be available for those using assistive technology.

In the example below, remove invisibleToUser to ensure views are available to people using assistive technology.

Row {
    Text("Welcome to Deque")
    Text("I am a text element.", modifier = Modifier.semantics {
        //Remove the below API to make it accessible
        invisibleToUser()
    })
}