OSDN Git Service

Fixed the accessibility of the reply button
authorSelim Cinek <cinek@google.com>
Wed, 28 Jun 2017 12:17:22 +0000 (14:17 +0200)
committerSelim Cinek <cinek@google.com>
Wed, 28 Jun 2017 12:17:22 +0000 (14:17 +0200)
The new button didn't have a content description before
and could therefore not be read.

Change-Id: I66f2c52b50494f7347d5beebc44c7d4fecfd33b2
Fixes: 62639422
Test: manual add reply notification, observe talkback

core/res/res/layout/notification_template_right_icon.xml
core/res/res/values/strings.xml

index aa4e05b..fbf7538 100644 (file)
@@ -26,8 +26,9 @@
                android:layout_gravity="top|end"
                android:layout_marginTop="36dp"
                android:layout_marginEnd="@dimen/notification_content_margin_end"
-               android:scaleType="centerCrop"/>
-    <ImageView android:id="@+id/reply_icon_action"
+               android:scaleType="centerCrop"
+               android:importantForAccessibility="no" />
+    <ImageButton android:id="@+id/reply_icon_action"
                android:layout_width="16dp"
                android:layout_height="16dp"
                android:layout_gravity="top|end"
@@ -36,6 +37,7 @@
                android:background="@drawable/notification_reply_background"
                android:src="@drawable/ic_reply_notification"
                android:scaleType="center"
+               android:contentDescription="@string/notification_reply_button_accessibility"
                visiblity="gone"/>
 </FrameLayout>
 
index e6c95c0..5a98a1e 100644 (file)
     <!-- Primary ETWS (Earthquake and Tsunami Warning System) default message for test -->
     <string name="etws_primary_default_message_test">Emergency messages test</string>
 
+    <!-- Content description for the reply button in the notification area [CHAR LIMIT=NONE]-->
+    <string name="notification_reply_button_accessibility">Reply</string>
+
     <!-- Primary ETWS (Earthquake and Tsunami Warning System) default message for others -->
     <string name="etws_primary_default_message_others"></string>