mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
a11y poll improvements
This commit is contained in:
@@ -35,6 +35,7 @@ struct PollOptionView: View {
|
|||||||
HStack(spacing: 4) {
|
HStack(spacing: 4) {
|
||||||
CompoundIcon(asset: Asset.Images.pollWinner)
|
CompoundIcon(asset: Asset.Images.pollWinner)
|
||||||
.foregroundColor(.compound.iconAccentTertiary)
|
.foregroundColor(.compound.iconAccentTertiary)
|
||||||
|
.accessibilityLabel(L10n.a11yPollsWinningAnswer)
|
||||||
|
|
||||||
Text(L10n.commonPollVotesCount(pollOption.votes))
|
Text(L10n.commonPollVotesCount(pollOption.votes))
|
||||||
.font(.compound.bodySMSemibold)
|
.font(.compound.bodySMSemibold)
|
||||||
|
|||||||
@@ -65,12 +65,14 @@ struct PollView: View {
|
|||||||
CompoundIcon(poll.hasEnded ? \.pollsEnd : \.polls,
|
CompoundIcon(poll.hasEnded ? \.pollsEnd : \.polls,
|
||||||
size: .custom(22),
|
size: .custom(22),
|
||||||
relativeTo: .compound.bodyLGSemibold)
|
relativeTo: .compound.bodyLGSemibold)
|
||||||
.accessibilityHidden(true)
|
.accessibilityLabel(poll.hasEnded ? L10n.a11yPollEnd : L10n.a11yPoll)
|
||||||
|
|
||||||
Text(poll.question)
|
Text(poll.question)
|
||||||
.multilineTextAlignment(.leading)
|
.multilineTextAlignment(.leading)
|
||||||
.font(.compound.bodyLGSemibold)
|
.font(.compound.bodyLGSemibold)
|
||||||
}
|
}
|
||||||
|
.accessibilityElement(children: .combine)
|
||||||
|
.accessibilityAddTraits(.isHeader)
|
||||||
}
|
}
|
||||||
|
|
||||||
private var optionsView: some View {
|
private var optionsView: some View {
|
||||||
|
|||||||
Reference in New Issue
Block a user