user14056819
user14056819

Reputation: 31

How can I make TalkBack ignore an element while still reading its content description when a parent element is focused?

Imagine I have a Labeled Checkbox containing two views. A text view on the left describing the field (the label) and a checkbox on the right.

I know that android:importantForAccessibility makes elements not focusable, but it also ignores their content descriptions. Basically: what's an alternative way to disallow focus that won't ignore content descriptions?

Upvotes: 1

Views: 910

Answers (1)

sigute
sigute

Reputation: 1201

If you use CheckBox element, you can set text to it and it will be read with the text and the state of the checkbox together.

If you are making your own checkbox by using a checkbox and a separate TextView, then you have to set your own content description on the parent view instead.

Upvotes: 1

Related Questions