talkback calls my content description twice

4.8k Views Asked by At

I have an item that steals the focus when its hosting activity is opened.

But then in talkback mode it's read twice.

1) how can i define an item to be read as soon as the activity it opned?

2) what can cause its content description to be read twice?

3) Is there a way to define content description to be read after click?

I saw this doc, but didn't find out answers.

2

There are 2 best solutions below

0
On

It seems if the outer container is 'focusable' then it might announce the content twice. For example:

<FrameLayout focusable='true'>
    <TextView/>
</FrameLayout>

So, for me the fix was to make the outer container 'not focusable'

0
On

The question lacks some specifics, but here are some answers.

1 - The screen reader will automatically focus and read the first view on the screen (from right to left, top to bottom). This is the default behavior and should not be changed.

2 - In some cases, the screen reader may perform a different action when your content is shown. For example, when a Dialog is shown, the default behavior for TalkBack is to announce the title and focus on the second view. If you are manually requesting the reader to focus on the title, it may be read twice.

3 - You can define the text to be read in your XML with android:contentDescription, or in your code with view.setContentDescription(textToRead)