Add accessibility labels to mentions (#14667)

This commit is contained in:
Ibrahem Khalil 2022-12-30 15:25:49 +02:00 committed by GitHub
parent 5493d059b9
commit 13e59635c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 21 deletions

View File

@ -11,22 +11,21 @@
(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
:title [text/text
{:weight :medium
:ellipsize-mode :tail
:number-of-lines 1
:size :small}
(if nickname
nickname
name)
(or nickname name)
(when nickname
[text/text
{:weight :regular
@ -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}]]))])