Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid - prevent TalkBack from announcing TextView title aloud
    primarykey
    data
    text
    <p>I am developing an accessible android application where people would be using Explore by Touch and TalkBack accessibility services to use my application. </p> <p>This is my Android XML code:</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/LinearLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"&gt; &lt;TextView android:id="@+id/forename" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="20dip" android:layout_marginLeft="15dip" android:textSize="20sp" android:text="@string/forenameText" android:contentDescription="@null"/&gt; &lt;EditText android:id="@+id/EditTextForename" android:layout_width="285dp" android:layout_height="65dp" android:layout_marginTop="10dip" android:layout_marginLeft="15dip" android:hint="@string/forenameHint" android:inputType="textPersonName" android:lines="1" android:singleLine="true" android:textSize="20sp" &gt; &lt;/EditText&gt; &lt;/LinearLayout&gt; </code></pre> <p>strings.xml</p> <pre><code>&lt;string name="forenameText"&gt;Forename&lt;/string&gt; &lt;string name="forenameHint"&gt;Enter your forename here&lt;/string&gt; </code></pre> <p>TextView displays the title "Forename" and EditText allows me to enter some details in the form field. The problem I have is that when I drag my finger across the screen by using Explore by Touch, TalkBack picks up the title of the TextView and announces it aloud as "Forename". I want the TextView to only display text and not provide any audible feedback.</p> <p>I have set contentDescription to @null as you can see from the code above, but TalkBack still announces "Forename" when my finger is located over the TextView.</p> <p>I have also tried setting contentDescription in my Java class:</p> <pre><code>TextView forename=(TextView)findViewById(R.id.forename); forename.setContentDescription(""); </code></pre> <p>However, I still get the same problem. Is there any other way to set contentDescription to null/empty and prevent TalkBack from announcing it aloud?</p> <p>Java code:</p> <pre><code>public class MainActivity extends Activity{ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); View forename = findViewById(R.id.forename); forename.setAccessibilityDelegate(new AccessibilityDelegate() { public boolean performAccessibilityAction (View host, int action, Bundle args){ return true; } }); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload