Nested Element Name
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.
All text within an accessibility element should be available to TalkBack.
Supported within:
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
- Turn on TalkBack
- Focus on the accessibility element containing the text
- 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()
})
}