Add accessibility label for community options button (#15484)

This commit is contained in:
Ibrahem Khalil 2023-03-28 07:50:07 +02:00 committed by GitHub
parent 394dfde87b
commit e825f930fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 12 deletions

View File

@ -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

View File

@ -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]