From 7ed4bc5a5cc832219914a88a46aa0b10e185d046 Mon Sep 17 00:00:00 2001 From: Ibrahem Khalil Date: Sun, 2 Apr 2023 20:16:51 +0200 Subject: [PATCH] Add accessibility id for community unread indicators (#15485) --- src/quo2/components/common/unread_grey_dot/view.cljs | 5 +++-- src/quo2/components/community/community_list_view.cljs | 2 +- src/quo2/components/list_items/channel.cljs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/quo2/components/common/unread_grey_dot/view.cljs b/src/quo2/components/common/unread_grey_dot/view.cljs index dd49e64c97..321ee3e433 100644 --- a/src/quo2/components/common/unread_grey_dot/view.cljs +++ b/src/quo2/components/common/unread_grey_dot/view.cljs @@ -3,6 +3,7 @@ [quo2.components.common.unread-grey-dot.style :as style])) (defn unread-grey-dot - [] + [accessibility-label] [rn/view - {:style style/unread-grey-dot}]) + (cond-> {:style style/unread-grey-dot} + accessibility-label (assoc :accessibility-label accessibility-label :accessible true))]) diff --git a/src/quo2/components/community/community_list_view.cljs b/src/quo2/components/community/community_list_view.cljs index d24d239286..9034a512e3 100644 --- a/src/quo2/components/community/community_list_view.cljs +++ b/src/quo2/components/community/community_list_view.cljs @@ -27,7 +27,7 @@ [counter/counter {:type :default} unread-mentions-count] unread-messages? - [unread-grey-dot])) + [unread-grey-dot :unviewed-messages-public])) (defn communities-list-view-item [props diff --git a/src/quo2/components/list_items/channel.cljs b/src/quo2/components/list_items/channel.cljs index 3023cf6ac0..4708482241 100644 --- a/src/quo2/components/list_items/channel.cljs +++ b/src/quo2/components/list_items/channel.cljs @@ -62,4 +62,4 @@ (not muted?) (not (pos? (int mentions-count))) unread-messages?) - [unread-grey-dot])]]]) + [unread-grey-dot :unviewed-messages-public])]]])