Overriding TalkBack announcements

1.4k views Asked by At

I am using a linear layout with multiple TextViews and LinearLayout within. Example Screen:

<RelativeLayout>
  <Movie LinearLayout>
     <TextView>
     <LinearLayout>
     <TextView>
  </MovieLinearLayout>
  <LinearLayoutCast>
  <LinearLayoutDirector>
  <..>
</RelativeLayout>

Whenever I access that screen, TalkBack speaks "Showing item x of y" which is really annoying because it's rather movie information and not a list as such. How can I override TalkBack from speaking "item x of y"? Is it possible using sendAccessibilityEvent?

2

There are 2 answers

1
Gabe Sechan On

Add an android:contentDescription property to them. See http://developer.android.com/training/accessibility/accessible-app.html for more advice

2
MobA11y On

You probably want to look at the View.AccessibilityDelegate methods. Find the proper view and override the delegate methods for that view. You most likely want to override onRequestSendAccessibilityEvent(ViewGroup host, View child, AccessibilityEvent event) though you could look into the other delegate methods as well.