Is it possible to append to the end what would be read for a layout? Setting the content description of the root view overrides everything and the child views are then not read. In addition getContentDescription() for a layout doesn't return what is actually read as the composite of all its child items - it only returns what has been explicitly set for the layout, which is null if nothing is set.
I'm thinking about adding a dummy view to the layout just to have text read for talkback, but that seems hacky.
In particular, we are looking to have add descriptions to the talkback, such as "This is selected. Double tap to de-select" and other similar descriptions.
First start by separating the content description, which describes the element, and the usage hint, which describes how to interact with the element.
If a ViewGroup has no explicit content description, it'll try to infer a description by collating the descriptions of that ViewGroup's children.
You should set an explicit content description for the ViewGroup. I advocate going further and making the children inaccessible directly.
This behaviour means that you have total control, and changes to the layout in future won't include the side effect of the content description for the ViewGroup changing also.
One way to append the selected state is to use a custom ViewGroup:
where
R.string.viewgroup_selected
is a String resource resolving to:<string name="viewgroup_selected">%1$s selected</string>
For the usage hint ("double tap to select/de-select"), you can use an accessibility delegate. This question has been answered here.