Skip to content

Commit 2f4bf52

Browse files
committed
Granular navigation not possible in edit text if the view has content description.
1. We were giving precedence of content description over text and this is what content description is supposed to do - override the text. However, putting content description on an EditText by mistake would render the text view not navigable which is pretty much unusable. Now we are giving precedence to the text and use the content description as a fall back if text is empty. bug:7078382 Change-Id: I00882ace149344478b127124bd5e641903e1b756
1 parent fa8d83d commit 2f4bf52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/widget/TextView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8355,7 +8355,7 @@ private void createEditorIfNeeded() {
83558355
*/
83568356
@Override
83578357
public CharSequence getIterableTextForAccessibility() {
8358-
if (getContentDescription() == null) {
8358+
if (!TextUtils.isEmpty(mText)) {
83598359
if (!(mText instanceof Spannable)) {
83608360
setText(mText, BufferType.SPANNABLE);
83618361
}

0 commit comments

Comments
 (0)