mirror of
git://jb55.com/damus
synced 2024-10-07 04:03:23 +00:00
Add accessibility labels to EventActionBar
Changelog-Added: Add accessibility labels to action bar Closes: #530
This commit is contained in:
parent
45f8c37498
commit
638052492d
@ -108,6 +108,7 @@ struct ZapButton: View {
|
|||||||
send_zap()
|
send_zap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.accessibilityLabel(NSLocalizedString("Zap", comment: "Accessibility label for zap button"))
|
||||||
|
|
||||||
Text("\(bar.zap_total > 0 ? "\(format_msats_abbrev(bar.zap_total))" : "")")
|
Text("\(bar.zap_total > 0 ? "\(format_msats_abbrev(bar.zap_total))" : "")")
|
||||||
.offset(x: 22)
|
.offset(x: 22)
|
||||||
|
@ -47,6 +47,7 @@ struct EventActionBar: View {
|
|||||||
EventActionButton(img: "bubble.left", col: nil) {
|
EventActionButton(img: "bubble.left", col: nil) {
|
||||||
notify(.reply, event)
|
notify(.reply, event)
|
||||||
}
|
}
|
||||||
|
.accessibilityLabel(NSLocalizedString("Reply", comment: "Accessibility label for reply button"))
|
||||||
}
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
ZStack {
|
ZStack {
|
||||||
@ -58,6 +59,7 @@ struct EventActionBar: View {
|
|||||||
self.confirm_boost = true
|
self.confirm_boost = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.accessibilityLabel(NSLocalizedString("Boosts", comment: "Accessibility label for boosts button"))
|
||||||
Text("\(bar.boosts > 0 ? "\(bar.boosts)" : "")")
|
Text("\(bar.boosts > 0 ? "\(bar.boosts)" : "")")
|
||||||
.offset(x: 18)
|
.offset(x: 18)
|
||||||
.font(.footnote.weight(.medium))
|
.font(.footnote.weight(.medium))
|
||||||
@ -89,6 +91,7 @@ struct EventActionBar: View {
|
|||||||
EventActionButton(img: "square.and.arrow.up", col: Color.gray) {
|
EventActionButton(img: "square.and.arrow.up", col: Color.gray) {
|
||||||
show_share_sheet = true
|
show_share_sheet = true
|
||||||
}
|
}
|
||||||
|
.accessibilityLabel(NSLocalizedString("Share", comment: "Button to share a post"))
|
||||||
}
|
}
|
||||||
.sheet(isPresented: $show_share_sheet) {
|
.sheet(isPresented: $show_share_sheet) {
|
||||||
if let note_id = bech32_note_id(event.id) {
|
if let note_id = bech32_note_id(event.id) {
|
||||||
@ -166,6 +169,7 @@ struct LikeButton: View {
|
|||||||
Image(liked ? "shaka-full" : "shaka-line")
|
Image(liked ? "shaka-full" : "shaka-line")
|
||||||
.foregroundColor(liked ? .accentColor : .gray)
|
.foregroundColor(liked ? .accentColor : .gray)
|
||||||
}
|
}
|
||||||
|
.accessibilityLabel(NSLocalizedString("Like", comment: "Accessibility Label for Like button"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user