1
votes

I have a ScrollView with multiple TextViews inside (which are not focusable by default). When I use TalkBack to navigate through the screen, TalkBack only focuses the whole ScrollView and reads all of its content at once.

I tried a couple things to make TalkBack focus each TextView instead of the ScrollView container, but I couldn't find a good way to do it. Here's a sample code:

<ScrollView
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:tools="http://schemas.android.com/tools"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:fillViewport="true">

   <LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical">

      <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:text="@string/string"/>

      <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:text="@string/a_string"/>

      <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:text="@string/some_string"/>

   </LinearLayout>

</ScrollView>

I tried to add android:focusable=true to each TextView, which made them focusable with TalkBack, but the parent ScrollView was still getting focused first. Ideally, I would prefer if the ScrollView was completely ignored by TalkBack, and the focus goes straight to its child Views.

How can I make TalkBack completely ignore the ScrollView and focuses each child TextView one by one instead?

1
Did you ever find a solution to this? I'm facing a very similar issue now. - David Berry

1 Answers

1
votes

You can use android:importantForAccessibility="no" on ScrollView to let talkback bypass the rootview and iterate through child views directly