summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Matt Pietal <mpietal@google.com> 2020-04-09 13:35:58 -0400
committer Matt Pietal <mpietal@google.com> 2020-04-09 13:53:41 -0400
commit6c89d1e310c1b0ff74d2af1a1ce13154f60c09f2 (patch)
tree84db60d08cc25f6e490ce3c5842684beb83c3c7d
parentbcc707d44c8d99527aa71b8bef97c22446bf9614 (diff)
Controls a11y - Fix title repetition, min height
There is no need for a content description on the associated icon, as the title is sufficient. Bug: 153288023 Bug: 153291530 Test: talkback Change-Id: I8617151cbbbb24f437e93a7c106997ef355206b6
-rw-r--r--packages/SystemUI/res/layout/controls_spinner_item.xml1
-rw-r--r--packages/SystemUI/res/layout/controls_with_favorites.xml2
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt2
3 files changed, 3 insertions, 2 deletions
diff --git a/packages/SystemUI/res/layout/controls_spinner_item.xml b/packages/SystemUI/res/layout/controls_spinner_item.xml
index 00654c832525..45540f102de1 100644
--- a/packages/SystemUI/res/layout/controls_spinner_item.xml
+++ b/packages/SystemUI/res/layout/controls_spinner_item.xml
@@ -30,6 +30,7 @@
android:layout_gravity="center"
android:layout_width="@dimen/controls_header_app_icon_size"
android:layout_height="@dimen/controls_header_app_icon_size"
+ android:contentDescription="@null"
android:layout_marginEnd="10dp" />
<TextView
diff --git a/packages/SystemUI/res/layout/controls_with_favorites.xml b/packages/SystemUI/res/layout/controls_with_favorites.xml
index 91beeb88d87f..fcefadf78c0e 100644
--- a/packages/SystemUI/res/layout/controls_with_favorites.xml
+++ b/packages/SystemUI/res/layout/controls_with_favorites.xml
@@ -34,6 +34,7 @@
android:orientation="horizontal"
android:layout_width="0dp"
android:layout_weight="1"
+ android:minHeight="48dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center">
@@ -43,6 +44,7 @@
android:layout_gravity="center"
android:layout_width="@dimen/controls_header_app_icon_size"
android:layout_height="@dimen/controls_header_app_icon_size"
+ android:contentDescription="@null"
android:layout_marginEnd="10dp" />
<TextView
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
index 02c6ff68450e..1423982d2efa 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
@@ -361,7 +361,6 @@ class ControlsUiControllerImpl @Inject constructor (
.setTint(context.resources.getColor(R.color.control_spinner_dropdown, null))
}
parent.requireViewById<ImageView>(R.id.app_icon).apply {
- setContentDescription(selectionItem.getTitle())
setImageDrawable(selectionItem.icon)
}
@@ -585,7 +584,6 @@ private class ItemAdapter(
setText(item.getTitle())
}
view.requireViewById<ImageView>(R.id.app_icon).apply {
- setContentDescription(item.appName)
setImageDrawable(item.icon)
}
return view