Question

I am making an app that is accessible to the blind. I am using android's accessibility framework. Currently I am running into an issue with the order items in a listview are being read to the user.

For example, I have a list view where each row has the values "place, name, level, score", in that order.

When navigating with droid's talkback turned on, the elements in each row are read out of order, for example it reads "level, score, place, name".

I have tried to set focus on the first element in the list item using requestFocus(), and also set the focus within the XML, yet nothing seems to work.

Any help is very appreciated. Thanks!

Was it helpful?

Solution

TalkBack reads contained items in screen position order (e.g. left to right, top to bottom for LTR locales like English).

You have two options:

  1. In your XML layout for the row, ensure the top-left coordinates of your value views are in the correct position for how you would like them read aloud.
  2. Specify a content description for the container that explicitly orders the values.

The second option looks like:

row.setContentDescription(place.getText() + " " + name.getText() + ...);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top