Reputation: 31
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
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