'Android accessibility talkback under controls navigation is not getting focussed in constraint Layout

I have a constraint Layout that contains imageViews. And Collection of these imageViews creates a button-like feel, which is different from the normal Android button. This whole constraint Layout acts as a button and I have implemented a click event on it.

Now, the problem comes in Android accessibility's talkback mode when the user opts to control navigation. The focus is not going to Constraint layout, it is because Android supports checkbox, switches, text fields, buttons. But for a normal user, it is a button. and talkback should focus on that constraint layout under Controls navigation. Is there any solution to this?

As per the Android talkback Accessibility documentation: enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source