Fix few A11y/ UI bugs for widget pickers
- Add a subtext in pin widget dialog informing users how to add widget
manually. This is not important for accessibility, as drag and drop is through an
action item for visually impaired users.
- Update search bar text hint color so that it passes accessibility test.
Bug: 182994384
Bug: 182993604
Test: Manually Tested using accessibility scanner app and talkback
Change-Id: I5a49d0bc3e5973b76c41b2a178af509e96a3cdd7
diff --git a/res/layout/add_item_confirmation_activity.xml b/res/layout/add_item_confirmation_activity.xml
index 3f45746..7c2f25b 100644
--- a/res/layout/add_item_confirmation_activity.xml
+++ b/res/layout/add_item_confirmation_activity.xml
@@ -36,6 +36,15 @@
android:singleLine="true"
android:maxLines="1" />
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_horizontal"
+ android:paddingVertical="8dp"
+ android:text="@string/add_item_request_drag_hint"
+ android:textSize="14sp"
+ android:importantForAccessibility="no"/>
+
<include layout="@layout/widget_cell"
android:id="@+id/widget_cell"
android:layout_width="match_parent"
diff --git a/res/layout/widgets_search_bar.xml b/res/layout/widgets_search_bar.xml
index 103f296..9a304eb 100644
--- a/res/layout/widgets_search_bar.xml
+++ b/res/layout/widgets_search_bar.xml
@@ -25,7 +25,7 @@
android:inputType="text"
android:imeOptions="actionSearch"
android:textColor="?android:attr/textColorPrimary"
- android:textColorHint="?android:attr/textColorTertiary"/>
+ android:textColorHint="?android:attr/textColorSecondary"/>
<ImageButton
android:id="@+id/widgets_search_cancel_button"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 680e51a..d6936ab 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -55,8 +55,9 @@
<string name="widget_dims_format">%1$d \u00d7 %2$d</string>
<!-- Accessibility spoken message format for the dimensions of a widget in the drawer -->
<string name="widget_accessible_dims_format">%1$d wide by %2$d high</string>
- <!-- Message to tell the user to press and hold a widget/icon to add it -->
- <string name="add_item_request_drag_hint">Touch & hold to place manually</string>
+ <!-- Message to tell the user to press and hold a widget/icon to add it to the home screen.
+ [CHAR LIMIT=NONE] -->
+ <string name="add_item_request_drag_hint">Touch & hold the widget to move it around the Home screen</string>
<!-- Button label to automatically add a widget to home screen [CHAR_LIMIT=50] -->
<string name="add_to_home_screen">Add to Home screen</string>
<!-- Label for showing the number of widgets an app has in the full widgets picker.