From 4a915c60e9149e57a63ca91398fcfc2f596c94e6 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Sun, 16 Apr 2017 16:23:10 -0500 Subject: [PATCH] Add content description to send button This can be used by screen readers and other accessibility aids. --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 3 +++ src/main/res/layout/fragment_conversation.xml | 3 ++- src/main/res/values/strings.xml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 9b96fa18a..b464d2318 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -891,6 +891,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa updateChatState(this.conversation, msg); } this.conversation.trim(); + this.mSendButton.setContentDescription(this.getActivity().getApplicationContext().getString(R.string.send_message_to_x,conversation.getName())); + } else { + this.mSendButton.setContentDescription(this.getActivity().getApplicationContext().getString(R.string.send_message)); } this.conversation = conversation; diff --git a/src/main/res/layout/fragment_conversation.xml b/src/main/res/layout/fragment_conversation.xml index 9f54fc427..cfc912e4c 100644 --- a/src/main/res/layout/fragment_conversation.xml +++ b/src/main/res/layout/fragment_conversation.xml @@ -57,7 +57,8 @@ android:layout_alignParentRight="true" android:layout_centerVertical="true" android:background="?attr/color_background_primary" - android:src="?attr/ic_send_text_offline" /> + android:src="?attr/ic_send_text_offline" + android:contentDescription="@string/send_message"/> End this conversation afterwards Choose device Send unencrypted message + Send message Send message to %s Send OTR encrypted message Send OMEMO encrypted message