Accessible content labels for attachment icons

Fixes #5908
Closes #5917
// FREEBIE
This commit is contained in:
Paul Lanctot 2016-12-02 16:56:18 -08:00 committed by Moxie Marlinspike
parent 01bc2ebde4
commit 73bf75f65f
2 changed files with 18 additions and 2 deletions

View File

@ -34,6 +34,7 @@
android:src="@drawable/ic_image_white_36dp"
android:scaleType="center"
android:elevation="4dp"
android:contentDescription="@string/attachment_type_selector__image_description"
app:circleColor="@color/purple_400"/>
<TextView android:layout_marginTop="10dp"
@ -57,6 +58,7 @@
android:src="@drawable/ic_headset_white_36dp"
android:scaleType="center"
android:elevation="4dp"
android:contentDescription="@string/attachment_type_selector__audio_description"
app:circleColor="@color/orange_400"/>
<TextView android:layout_marginTop="10dp"
@ -80,7 +82,7 @@
android:src="@drawable/ic_local_movies_white_36dp"
android:scaleType="center"
android:elevation="4dp"
android:contentDescription="@string/attachment_type_selector__video_description"
app:circleColor="@color/red_400"/>
<TextView android:layout_marginTop="10dp"
@ -104,6 +106,7 @@
android:src="@drawable/ic_person_white_36dp"
android:scaleType="center"
android:elevation="4dp"
android:contentDescription="@string/attachment_type_selector__contact_description"
app:circleColor="@color/blue_400"/>
<TextView android:layout_marginTop="10dp"
@ -138,6 +141,7 @@
android:src="@drawable/ic_camera_white_36dp"
android:scaleType="center"
android:elevation="4dp"
android:contentDescription="@string/attachment_type_selector__camera_description"
app:circleColor="@color/green_400"/>
<TextView android:layout_marginTop="10dp"
@ -163,6 +167,7 @@
android:src="@drawable/ic_location_on_white_36dp"
android:scaleType="center"
android:elevation="4dp"
android:contentDescription="@string/attachment_type_selector__location_description"
app:circleColor="@color/blue_grey_400"/>
<TextView android:layout_marginTop="10dp"
@ -187,13 +192,14 @@
android:src="@drawable/ic_gif_white_36dp"
android:scaleType="center"
android:elevation="4dp"
android:contentDescription="@string/attachment_type_selector__gif_description"
app:circleColor="@color/cyan_400"/>
<TextView android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/AttachmentTypeLabel"
android:text="GIF"/>
android:text="@string/attachment_type_selector__gif"/>
</LinearLayout>
@ -210,6 +216,7 @@
android:src="@drawable/ic_keyboard_arrow_down_white_36dp"
android:scaleType="center"
android:elevation="4dp"
android:contentDescription="@string/attachment_type_selector__drawer_description"
app:circleColor="@color/gray50"/>
<TextView android:layout_marginTop="10dp"

View File

@ -632,11 +632,20 @@
<!-- attachment_type_selector -->
<string name="attachment_type_selector__image">Image</string>
<string name="attachment_type_selector__image_description">Image</string>
<string name="attachment_type_selector__audio">Audio</string>
<string name="attachment_type_selector__audio_description">Audio</string>
<string name="attachment_type_selector__video">Video</string>
<string name="attachment_type_selector__video_description">Video</string>
<string name="attachment_type_selector__contact">Contact</string>
<string name="attachment_type_selector__contact_description">Contact</string>
<string name="attachment_type_selector__camera">Camera</string>
<string name="attachment_type_selector__camera_description">Camera</string>
<string name="attachment_type_selector__location">Location</string>
<string name="attachment_type_selector__location_description">Location</string>
<string name="attachment_type_selector__gif">GIF</string>
<string name="attachment_type_selector__gif_description">Gif</string>
<string name="attachment_type_selector__drawer_description">Toggle attachment drawer</string>
<!-- change_passphrase_activity -->
<string name="change_passphrase_activity__old_passphrase">Old passphrase</string>