damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 638052492dfb6ac6461463f06c7fe6fb5432b47d
parent 45f8c374981eda5550d2b6cb774586de6d639d76
Author: Bryan Montz <bryan.montz@lifechurch.tv>
Date:   Sun,  5 Feb 2023 08:04:36 -0600

Add accessibility labels to EventActionBar

Changelog-Added: Add accessibility labels to action bar
Closes: #530

Diffstat:
Mdamus/Components/ZapButton.swift | 1+
Mdamus/Views/ActionBar/EventActionBar.swift | 4++++
2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/damus/Components/ZapButton.swift b/damus/Components/ZapButton.swift @@ -108,6 +108,7 @@ struct ZapButton: View { send_zap() } } + .accessibilityLabel(NSLocalizedString("Zap", comment: "Accessibility label for zap button")) Text("\(bar.zap_total > 0 ? "\(format_msats_abbrev(bar.zap_total))" : "")") .offset(x: 22) diff --git a/damus/Views/ActionBar/EventActionBar.swift b/damus/Views/ActionBar/EventActionBar.swift @@ -47,6 +47,7 @@ struct EventActionBar: View { EventActionButton(img: "bubble.left", col: nil) { notify(.reply, event) } + .accessibilityLabel(NSLocalizedString("Reply", comment: "Accessibility label for reply button")) } Spacer() ZStack { @@ -58,6 +59,7 @@ struct EventActionBar: View { self.confirm_boost = true } } + .accessibilityLabel(NSLocalizedString("Boosts", comment: "Accessibility label for boosts button")) Text("\(bar.boosts > 0 ? "\(bar.boosts)" : "")") .offset(x: 18) .font(.footnote.weight(.medium)) @@ -89,6 +91,7 @@ struct EventActionBar: View { EventActionButton(img: "square.and.arrow.up", col: Color.gray) { show_share_sheet = true } + .accessibilityLabel(NSLocalizedString("Share", comment: "Button to share a post")) } .sheet(isPresented: $show_share_sheet) { if let note_id = bech32_note_id(event.id) { @@ -166,6 +169,7 @@ struct LikeButton: View { Image(liked ? "shaka-full" : "shaka-line") .foregroundColor(liked ? .accentColor : .gray) } + .accessibilityLabel(NSLocalizedString("Like", comment: "Accessibility Label for Like button")) } }