28
votes

I have a problem with the accessibility focus of the NestedScrollView child views. Currently, the focus iteration during accessibility mode only iterates through the views where the views are visible on the screen.

Is there a layout configuration where I can set to scroll the NestedScrollview during focus iteration? Currently, the focus iteration just stops once it reaches the last visible view on the current screen and not scroll the scrollview to the next focusable view?

Tested with Android version 4.3(Galaxy nexus) and 5.1.1(Nexus 4). TalkBack version is 4.2.0. In the latest update, we also included testing within devices Android 5.1 V 22, Android 8 V 26, Android 10, V 29. Tested with the latest TalkBack version.

  <android.support.v4.widget.NestedScrollView
    android:id="@+id/nsvScrollview"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:contentDescription="@null"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    android:fillViewport="true">
  
    <!-- Any other views here. Including WebView -->
  
  </android.support.v4.widget.NestedScrollView>

UPDATE.

Somehow similar question for the TalkBack Accessibility Service. And setting Content Description for it. How we need to set up Views with NestedScrollView to make TalkBack iterate Screen Reader throw all items with scrolling. And not only visible pages. Please consider the explanation for scrolling WebView inside NestedScrollView. As it's also an important thing in Accessibility Services.

1
When you ask Android related questions, you should always include Android Version, TalkBack version, Device, etc. As there's such a wide variety of behaviors and combinations.ChrisCM
Thanks for the heads up, uedited question to reflect android version and talkback versionkyo171
@kyo171 I am facing the same issue at the moment, have you found any solution to this?Mohan Krishna
can you please share more code?Ashwani kumar
@kyo171 Any updates on this?GensaGames

1 Answers

-1
votes

You can use announce for accessibility option in this case. anounceForAccessibility added in API level 16 public void announceForAccessibility (CharSequence text) Convenience method for sending a AccessibilityEvent.TYPE_ANNOUNCEMENT AccessibilityEvent to make an announcement which is related to some sort of a context change for which none of the events representing UI transitions is a good fit. For example, announcing a new page in a book. If accessibility is not enabled this method does nothing.