Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0451f9a7 authored by Andrew Lee's avatar Andrew Lee
Browse files

Improve talkback on call log actions.

- Remove previous/next hints; not needed.
+ Add descriptions for new actions.
- Make TextViews not important for accessibility. Descriptions on the
actions will be used instead.

Bug: 20433758
Change-Id: I043b03075631134f37151e165360b038f3961b2a
parent 84586d3b
Loading
Loading
Loading
Loading
+6 −18
Original line number Diff line number Diff line
@@ -25,9 +25,7 @@

    <LinearLayout
        android:id="@+id/video_call_action"
        style="@style/CallLogActionStyle"
        android:nextFocusLeft="@+id/primary_action_view"
        android:nextFocusRight="@+id/voicemail_action">
        style="@style/CallLogActionStyle">

        <ImageView
            style="@style/CallLogActionIconStyle"
@@ -41,9 +39,7 @@

    <LinearLayout
        android:id="@+id/voicemail_action"
        style="@style/CallLogActionStyle"
        android:nextFocusLeft="@+id/video_call_action"
        android:nextFocusRight="@+id/details_action">
        style="@style/CallLogActionStyle">

        <ImageView
            style="@style/CallLogActionIconStyle"
@@ -57,9 +53,7 @@

    <LinearLayout
        android:id="@+id/create_new_contact_action"
        style="@style/CallLogActionStyle"
        android:nextFocusLeft="@+id/voicemail_action"
        android:nextFocusRight="@+id/add_to_existing_contact_action">
        style="@style/CallLogActionStyle">

        <ImageView
            style="@style/CallLogActionIconStyle"
@@ -73,9 +67,7 @@

    <LinearLayout
        android:id="@+id/add_to_existing_contact_action"
        style="@style/CallLogActionStyle"
        android:nextFocusLeft="@+id/create_new_contact_action"
        android:nextFocusRight="@+id/details_action">
        style="@style/CallLogActionStyle">

        <ImageView
            style="@style/CallLogActionIconStyle"
@@ -89,9 +81,7 @@

    <LinearLayout
        android:id="@+id/details_action"
        style="@style/CallLogActionStyle"
        android:nextFocusLeft="@+id/voicemail_action"
        android:nextFocusRight="@+id/report_action">
        style="@style/CallLogActionStyle">

        <ImageView
            style="@style/CallLogActionIconStyle"
@@ -105,9 +95,7 @@

    <LinearLayout
        android:id="@+id/report_action"
        style="@style/CallLogActionStyle"
        android:nextFocusLeft="@+id/details_action"
        android:nextFocusRight="@+id/primary_action_view">
        style="@style/CallLogActionStyle">

        <ImageView
            style="@style/CallLogActionIconStyle"
+31 −4
Original line number Diff line number Diff line
@@ -585,26 +585,53 @@
         action triggers a return call to the named user.
         Note: AccessibilityServices uses this attribute to announce the purpose of the button.
         [CHAR LIMIT=NONE] -->
    <string name="description_call_action">Call <xliff:g id="nameOrNumber" example="John Smith">^1</xliff:g></string>
    <string name="description_call_action">
        Call <xliff:g id="nameOrNumber" example="John Smith">^1</xliff:g>
    </string>

    <!-- String describing the "video call" action for an entry in the call log.  The video call
         action triggers a return video call to the named person/number.
         Note: AccessibilityServices uses this attribute to announce the purpose of the button.
         [CHAR LIMIT=NONE] -->
    <string name="description_video_call_action">Video call to <xliff:g id="nameOrNumber" example="John Smith">^1</xliff:g>.</string>
    <string name="description_video_call_action">
        Video call <xliff:g id="nameOrNumber" example="John Smith">^1</xliff:g>.
    </string>

    <!-- String describing the "listen" action for an entry in the call log.  The listen
         action is shown for call log entries representing a voicemail message and this button
         triggers playing back the voicemail.
         Note: AccessibilityServices uses this attribute to announce the purpose of the button.
         [CHAR LIMIT=NONE] -->
    <string name="description_voicemail_action">Listen to voicemail from <xliff:g id="nameOrNumber" example="John Smith">^1</xliff:g></string>
    <string name="description_voicemail_action">
        Listen to voicemail from <xliff:g id="nameOrNumber" example="John Smith">^1</xliff:g>
    </string>

    <!-- Description for the "create new contact" action for an entry in the call log. This action
         opens a screen for creating a new contact for this name or number. [CHAR LIMIT=NONE] -->
    <string name="description_create_new_contact_action">
        Create contact for <xliff:g id="nameOrNumber" example="John Smith">^1</xliff:g>
    </string>

    <!-- Description for the "add to existing contact" action for an entry in the call log. This
         action opens a screen for adding this name or number to an existing contact.
         [CHAR LIMIT=NONE] -->
    <string name="description_add_to_existing_contact_action">
        Add <xliff:g id="nameOrNumber" example="John Smith">^1</xliff:g> to existing contact
    </string>

    <!-- String describing the "details" action for an entry in the call log.  The details action
         displays the call details screen for an entry in the call log.  This shows the calls to
         and from the specified number associated with the call log entry.
         [CHAR LIMIT=NONE] -->
    <string name="description_details_action">Call details for <xliff:g id="nameOrNumber" example="John Smith">^1</xliff:g></string>
    <string name="description_details_action">
        Call details for <xliff:g id="nameOrNumber" example="John Smith">^1</xliff:g>
    </string>

    <!-- Description for the "report" action for an entry in the call log. This action reports that
         the phone number lookup performed for the entry was inaccurate. [CHAR LIMIT=NONE] -->
    <string name="description_report_action">
        Report <xliff:g id="nameOrNumber" example="John Smith">^1</xliff:g>
    </string>

    <!-- Toast message which appears when a call log entry is deleted.
         [CHAR LIMIT=NONE] -->
+1 −0
Original line number Diff line number Diff line
@@ -177,6 +177,7 @@
        <item name="android:fontFamily">"sans-serif-medium"</item>
        <item name="android:focusable">true</item>
        <item name="android:singleLine">true</item>
        <item name="android:importantForAccessibility">no</item>
    </style>

    <style name="CallLogActionIconStyle">
+14 −0
Original line number Diff line number Diff line
@@ -99,9 +99,23 @@ import com.android.dialer.R;
                TextUtils.expandTemplate(
                        mResources.getString(R.string.description_voicemail_action), nameOrNumber));

        views.createNewContactButtonView.setContentDescription(
                TextUtils.expandTemplate(
                        mResources.getString(R.string.description_create_new_contact_action),
                        nameOrNumber));

        views.addToExistingContactButtonView.setContentDescription(
                TextUtils.expandTemplate(
                        mResources.getString(R.string.description_add_to_existing_contact_action),
                        nameOrNumber));

        views.detailsButtonView.setContentDescription(
                TextUtils.expandTemplate(
                        mResources.getString(R.string.description_details_action), nameOrNumber));

        views.reportButtonView.setContentDescription(
                TextUtils.expandTemplate(
                        mResources.getString(R.string.description_report_action), nameOrNumber));
    }

    /**