a11y poll improvements

This commit is contained in:
Mauro Romito
2025-06-26 12:28:41 +02:00
committed by Mauro
parent d2b38a4cbe
commit a562d239db
2 changed files with 4 additions and 1 deletions
@@ -35,6 +35,7 @@ struct PollOptionView: View {
HStack(spacing: 4) {
CompoundIcon(asset: Asset.Images.pollWinner)
.foregroundColor(.compound.iconAccentTertiary)
.accessibilityLabel(L10n.a11yPollsWinningAnswer)
Text(L10n.commonPollVotesCount(pollOption.votes))
.font(.compound.bodySMSemibold)
@@ -65,12 +65,14 @@ struct PollView: View {
CompoundIcon(poll.hasEnded ? \.pollsEnd : \.polls,
size: .custom(22),
relativeTo: .compound.bodyLGSemibold)
.accessibilityHidden(true)
.accessibilityLabel(poll.hasEnded ? L10n.a11yPollEnd : L10n.a11yPoll)
Text(poll.question)
.multilineTextAlignment(.leading)
.font(.compound.bodyLGSemibold)
}
.accessibilityElement(children: .combine)
.accessibilityAddTraits(.isHeader)
}
private var optionsView: some View {