From cf753a08929d2259ae9044a511134e80a76d0532 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Wed, 16 Nov 2022 13:22:47 +0100 Subject: [PATCH] [#14381] Add accessibility lables for chat key and timestamp in message --- .../ui2/screens/chat/messages/message.cljs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/status_im/ui2/screens/chat/messages/message.cljs b/src/status_im/ui2/screens/chat/messages/message.cljs index a379c673d8..7414c9339e 100644 --- a/src/status_im/ui2/screens/chat/messages/message.cljs +++ b/src/status_im/ui2/screens/chat/messages/message.cljs @@ -288,11 +288,17 @@ display-name] [message-home-item/verified-or-contact-icon contact] (when show-key? - [text/text {:size :label - :style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40) - :margin-left 8 - :margin-top 2}} - (str (utils/get-shortened-address (:public-key contact)) " • " (time/to-short-str timestamp))])]) + (let [props {:size :label + :style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40)}}] + [text/text {:style {:margin-left 8 + :margin-top 2}} + [text/text + (assoc props :accessibility-label :message-chat-key) + (utils/get-shortened-address (:public-key contact))] + [text/text props " • "] + [text/text + (assoc props :accessibility-label :message-timestamp) + (time/to-short-str timestamp)]]))]) (defn message-content-wrapper "Author, userpic and delivery wrapper"