summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllog/ui/res
diff options
context:
space:
mode:
authorlinyuh <linyuh@google.com>2018-05-23 16:41:50 -0700
committerEric Erfanian <erfanian@google.com>2018-05-30 14:03:01 +0000
commit19a7c0eda9730798100994e0b5a6e99197f04f3d (patch)
tree728f98a3d2b71fc7bd662a38a0f7f22b4e0009e4 /java/com/android/dialer/calllog/ui/res
parent2ad3c08bc26edee0c721505e21c9764c10e3e5f7 (diff)
Better a11y for new call log entries.
Bug: 70989658 Test: CallLogDatesTest, CallLogEntryDescriptionsTest, NewCallLogViewHolderTest PiperOrigin-RevId: 197811739 Change-Id: I0f9d1e79d8e687efffbb1dac01aaf6fa26a45f6a
Diffstat (limited to 'java/com/android/dialer/calllog/ui/res')
-rw-r--r--java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml16
-rw-r--r--java/com/android/dialer/calllog/ui/res/values/strings.xml17
2 files changed, 26 insertions, 7 deletions
diff --git a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml
index 0acd8155f..726c53bc1 100644
--- a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml
+++ b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml
@@ -30,13 +30,19 @@
android:layout_marginEnd="8dp"
android:layout_centerVertical="true"/>
+ <!--
+ A vertical linear layout of three rows: primary info, secondary info, and phone account info.
+ It is marked as not important for a11y as we will set a more user-friendly content description
+ for the entire entry view in Java code.
+ -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/contact_photo_view"
android:layout_toStartOf="@+id/menu_button"
- android:orientation="vertical">
+ android:orientation="vertical"
+ android:importantForAccessibility="noHideDescendants">
<!-- 1st row: primary info -->
<LinearLayout
@@ -134,6 +140,10 @@
</LinearLayout>
+ <!--
+ The button to expand the bottom sheet for an entry.
+ Its content description is set in Java code.
+ -->
<ImageView
android:id="@+id/menu_button"
android:layout_width="56dp"
@@ -141,8 +151,8 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:background="?android:attr/selectableItemBackgroundBorderless"
- android:contentDescription="@string/a11y_new_call_log_expand_menu_for_entry"
android:scaleType="center"
android:src="@drawable/quantum_ic_more_vert_vd_theme_24"
- android:tint="?colorIcon"/>
+ android:tint="?colorIcon"
+ tools:ignore="ContentDescription"/>
</RelativeLayout>
diff --git a/java/com/android/dialer/calllog/ui/res/values/strings.xml b/java/com/android/dialer/calllog/ui/res/values/strings.xml
index 3f6462c7b..112044f6e 100644
--- a/java/com/android/dialer/calllog/ui/res/values/strings.xml
+++ b/java/com/android/dialer/calllog/ui/res/values/strings.xml
@@ -16,12 +16,21 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!--
+ A string informing a11y users that activating a call log entry will place a call.
+ Note: the word "call" here is a verb.
+ [CHAR LIMIT=NONE]
+ -->
+ <string name="a11y_new_call_log_entry_tap_action">call</string>
+
<!--
- A string to describe available action for accessibility user.
- It will be read as "expand menu for this call log entry".
+ A string describing the menu button of a call log entry for a11y users.
+ An example will be read as "expand call log menu for Jane Smith".
+ [CHAR LIMIT=NONE]
-->
- <string name="a11y_new_call_log_expand_menu_for_entry">
- Expand menu for this call log entry
+ <string name="a11y_new_call_log_entry_expand_menu">
+ Expand call log menu for <xliff:g example="Jane Smith" id="primaryTextForEntry">%1$s</xliff:g>
</string>
<!-- Header in call log to group calls from the current day. [CHAR LIMIT=30] -->