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

Commit 8c8cafb2 authored by Brian Attwell's avatar Brian Attwell
Browse files

Improve content descriptions a bit

* Don't apply content descriptions to empty images
* Content descriptions for mimetype images consistently
  omit the word "section". Ie, "email" instead of "email section".

Bug: 18004959
Change-Id: I9d74b78dda7f071a0e7bdefe38eda3ad4b136fd2
parent da71919d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
        android:id="@+id/kind_icon"
        android:src="@drawable/ic_camera_alt_black_24dp"
        android:layout_marginTop="8dp"
        android:contentDescription="@string/photo_section"
        android:contentDescription="@string/header_photo_entry"
        style="@style/EditKindIconStyle" />

    <!-- Needs 10dp of top padding, in order get a total of 32dp of padding between this view
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
        android:id="@+id/kind_icon"
        android:src="@drawable/ic_camera_alt_black_24dp"
        android:layout_marginTop="8dp"
        android:contentDescription="@string/photo_section"
        android:contentDescription="@string/header_photo_entry"
        style="@style/EditKindIconStyle" />

    <!-- Needs 10dp of top padding, in order get a total of 32dp of padding between this view
+5 −6
Original line number Diff line number Diff line
@@ -438,9 +438,6 @@
    <!-- Button used for changing a photo in the Raw Contact Editor [CHAR LIMIT=15] -->
    <string name="change_photo">Change</string>

    <!-- Content description for the camera icon beside the photo section in the Raw Contact Editor [CHAR LIMIT=NONE] -->
    <string name="photo_section">Photo section</string>

    <!-- RadioButton that determines whether a raw contact's photo should be used for the entire contact [CHAR LIMIT=15] -->
    <string name="primary_photo">Primary photo</string>

@@ -709,11 +706,13 @@
    <!-- Header for the Relation entry [CHAR LIMIT=40] -->
    <string name="header_relation_entry">Relation</string>
    <!-- Content description for the name fields header entry [CHAR LIMIT=NONE] -->
    <string name="header_name_entry">Name section</string>
    <string name="header_name_entry">Name</string>
    <!-- Content description for the email fields header entry [CHAR LIMIT=NONE] -->
    <string name="header_email_entry">Email section</string>
    <string name="header_email_entry">Email</string>
    <!-- Content description for the phone fields header entry [CHAR LIMIT=NONE] -->
    <string name="header_phone_entry">Phone section</string>
    <string name="header_phone_entry">Phone</string>
    <!-- Content description for the camera icon beside the photo section in the Raw Contact Editor [CHAR LIMIT=NONE] -->
    <string name="header_photo_entry">Photo</string>

    <!-- Content description for directions secondary button [CHAR LIMIT=NONE] -->
    <string name="content_description_directions">directions to location</string>
+3 −0
Original line number Diff line number Diff line
@@ -141,6 +141,9 @@ public class KindSectionView extends LinearLayout implements EditorListener {
        mIcon.setContentDescription(titleString);

        mIcon.setImageDrawable(getMimeTypeDrawable(kind.mimeType));
        if (mIcon.getDrawable() == null) {
            mIcon.setContentDescription(null);
        }

        rebuildFromState();
        updateEmptyEditors(/* shouldAnimate = */ false);