You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.
Open task detail from the task list screen and explore the opened screen with TalkBack turned on.
Besides the elements of the details page, TalkBack will also focus on the hidden views of the task list screen:
i think this is a bug in SlidingPaneLayout library. Until it is fixed, as a workaround we can set importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS on the hidden pane of the SlidingPaneLayout. Something like this:
--- a/app/src/main/java/com/example/android/trackr/ui/BaseTwoPaneFragment.kt
slidingPaneLayout.addPanelSlideListener(SlidingPaneAccessibilityHandler(slidingPaneLayout))
internal class SlidingPaneAccessibilityHandler(private val slidingPaneLayout: SlidingPaneLayout) : PanelSlideListener {
private val listPaneContent by lazy(NONE) {
slidingPaneLayout.findViewById<ViewGroup>(R.id.list_pane)[0]
}
init {
slidingPaneLayout.doOnLayout {
syncState()
}
}
private fun syncState() {
val mode = if (slidingPaneLayout.isSlideable && slidingPaneLayout.isOpen) {
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
} else {
View.IMPORTANT_FOR_ACCESSIBILITY_AUTO
}
listPaneContent.importantForAccessibility = mode
}
override fun onPanelOpened(panel: View) {
syncState()
}
override fun onPanelClosed(panel: View) {
syncState()
}
override fun onPanelSlide(panel: View, slideOffset: Float) {
// empty
}
}
This snippet fixes the problem.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Android 11, Samsung SM-G770F/DS, TalkBack 12.5.01.2
Open task detail from the task list screen and explore the opened screen with TalkBack turned on.
Besides the elements of the details page, TalkBack will also focus on the hidden views of the task list screen:
i think this is a bug in SlidingPaneLayout library. Until it is fixed, as a workaround we can set
importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
on the hidden pane of the SlidingPaneLayout. Something like this:This snippet fixes the problem.
The text was updated successfully, but these errors were encountered: