From e825f930fa95faab69afbdf17155155a9f38dad2 Mon Sep 17 00:00:00 2001 From: Ibrahem Khalil Date: Tue, 28 Mar 2023 07:50:07 +0200 Subject: [PATCH] Add accessibility label for community options button (#15484) --- src/quo2/components/navigation/page_nav.cljs | 10 ++++++---- .../contexts/communities/overview/view.cljs | 16 ++++++++-------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/quo2/components/navigation/page_nav.cljs b/src/quo2/components/navigation/page_nav.cljs index 5e2e235e36..b67a21bfe2 100644 --- a/src/quo2/components/navigation/page_nav.cljs +++ b/src/quo2/components/navigation/page_nav.cljs @@ -150,13 +150,15 @@ :justify-content :flex-end)} (let [last-icon-index (-> right-section-buttons count dec)] (map-indexed (fn [index - {:keys [icon on-press type style icon-override-theme] + {:keys [icon on-press type style icon-override-theme accessibility-label] :or {type :grey}}] ^{:key index} [rn/view - {:style (assoc style - :margin-right - (if (= index last-icon-index) 0 8))} + (cond-> {:style (assoc style + :margin-right + (if (= index last-icon-index) 0 8))} + accessibility-label (assoc :accessibility-label accessibility-label + :accessible true)) [button/button {:on-press on-press :icon true diff --git a/src/status_im2/contexts/communities/overview/view.cljs b/src/status_im2/contexts/communities/overview/view.cljs index f52cc52513..e061dfc64e 100644 --- a/src/status_im2/contexts/communities/overview/view.cljs +++ b/src/status_im2/contexts/communities/overview/view.cljs @@ -295,14 +295,14 @@ (defn page-nav-right-section-buttons [id] - [{:icon :i/options - :background-color (scroll-page/icon-color) - :on-press #(rf/dispatch - [:bottom-sheet/show-sheet - {:content - (fn [] - [options/community-options-bottom-sheet - id])}])}]) + [{:icon :i/options + :background-color (scroll-page/icon-color) + :accessibility-label :community-options-for-community + :on-press #(rf/dispatch + [:bottom-sheet/show-sheet + {:content (fn [] + [options/community-options-bottom-sheet + id])}])}]) (defn pick-first-category-by-height [scroll-height first-channel-height categories-heights]