From 13e59635c7daae16aed4df66badcc814511383f5 Mon Sep 17 00:00:00 2001 From: Ibrahem Khalil Date: Fri, 30 Dec 2022 15:25:49 +0200 Subject: [PATCH] Add accessibility labels to mentions (#14667) --- .../ui2/screens/chat/composer/mentions.cljs | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/status_im/ui2/screens/chat/composer/mentions.cljs b/src/status_im/ui2/screens/chat/composer/mentions.cljs index 97d9248e5a..bb154f2dbe 100644 --- a/src/status_im/ui2/screens/chat/composer/mentions.cljs +++ b/src/status_im/ui2/screens/chat/composer/mentions.cljs @@ -11,32 +11,31 @@ (defn mention-item [[public-key {:keys [alias name nickname] :as user}] _ _ text-input-ref] (let [ens-name? (not= alias name)] - [rn/touchable-opacity {:on-press #(rf/dispatch [:chat.ui/select-mention text-input-ref user])} + [rn/touchable-opacity + {:on-press #(rf/dispatch [:chat.ui/select-mention text-input-ref user]) + :accessibility-label :mention-item} ;;TODO quo2 item should be used [list-item/list-item (cond-> {:icon [photos/member-photo public-key] :size :small :text-size :small - :title - [text/text - {:weight :medium - :ellipsize-mode :tail - :number-of-lines 1 - :size :small} - (if nickname - nickname - name) - (when nickname - [text/text - {:weight :regular - :color :secondary - :ellipsize-mode :tail - :size :small} - " " - (when ens-name? - "@") - name])] + :title [text/text + {:weight :medium + :ellipsize-mode :tail + :number-of-lines 1 + :size :small} + (or nickname name) + (when nickname + [text/text + {:weight :regular + :color :secondary + :ellipsize-mode :tail + :size :small} + " " + (when ens-name? + "@") + name])] :title-text-weight :medium} ens-name? (assoc :subtitle alias))]])) @@ -58,4 +57,5 @@ :key-fn first :render-fn mention-item :render-data text-input-ref - :content-container-style {:padding-bottom 12}}]]))]) + :content-container-style {:padding-bottom 12} + :accessibility-label :mentions-list}]]))])