epoxy
epoxy copied to clipboard
EpoxyGroupModel doesn't respect accessibility settings for EpoxyModel views
I'm looking for some more information about how EpoxyModels and EpoxyGroupModels handle accessibility.
It seems as though the group will take all the internal contentDescriptions and apply append them all applying it to the whole group.
This seems a bit odd to me. Maybe its intentional default behavior to describe the whole model in one shot, which I think makes sense would be okay but
But if I set importantForAccessibility=yes for these internal views TalkBack will still skip over these views because it acts as though its already been read. Even if setting a contentDescription for the holder.rootView the internal views will be skipped.
If using the EpoxyModel on its own this does not happen.
Happy to look into this and find a PR to fix it but I'm not exact sure where to look.
Thanks for any input in advanced!
So I found a solution to this. Though still not quite sure where the original issue is coming from.
Solution was to simply findViewById after calling super.bind(holder) in the EpoxyModelGroup and set IsFocusableIntTouchMode there.
That being said this was already set in XML and seems like it should be respected.
I found that the contentDescription concatenation is a RecyclerView feature but once again setting importantForAccessibility = yes should get around this (as it does when using the Model directly.
I believe this confirms my suspicion that there is a bug with the EpoxyGroupModels
It may have something to do with setVisibility on the itemView? The internal EpoxyModel is not reused in this list (at least on this screen anddd I am not sharing the ViewPool yet)
I want to say I will keep digging, hopefully someone has some pointers here. Otherwise at least this work around might be useful to others
I was looking into the ViewStubs as well, but no luck there. I was hoping the solution was as simple as setting the importantForAccessibility=no on the Model's rootView through the ViewStub. since setting this on the rootView when using the model seems to work.
I should note that the reason behind using the EpoxyGroupModel is partial because its good for accessibility i.e. good default counts when going down the recyclerView in ADA mode
Is there updated documentation on accessibility practices with Epoxy Group Models?