mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
Fix some issues with missing a11y labels (#5747)
* add a11y label to the bug report field * include a11y label to the list row directly * remove is header trait from poll form question header section * a11y label added to the create room screen name textfield
This commit is contained in:
@@ -48,6 +48,7 @@ struct PollFormScreen: View {
|
|||||||
} header: {
|
} header: {
|
||||||
Text(L10n.screenCreatePollQuestionDesc)
|
Text(L10n.screenCreatePollQuestionDesc)
|
||||||
.compoundListSectionHeader()
|
.compoundListSectionHeader()
|
||||||
|
.accessibilityRemoveTraits(.isHeader)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ struct CreateRoomScreen: View {
|
|||||||
.foregroundStyle(.compound.textPrimary)
|
.foregroundStyle(.compound.textPrimary)
|
||||||
.tint(.compound.iconAccentTertiary)
|
.tint(.compound.iconAccentTertiary)
|
||||||
.focused($focus, equals: .name)
|
.focused($focus, equals: .name)
|
||||||
|
.accessibilityLabel(L10n.commonName)
|
||||||
.accessibilityIdentifier(A11yIdentifiers.createRoomScreen.roomName)
|
.accessibilityIdentifier(A11yIdentifiers.createRoomScreen.roomName)
|
||||||
.padding(.horizontal, ListRowPadding.horizontal)
|
.padding(.horizontal, ListRowPadding.horizontal)
|
||||||
.padding(.vertical, ListRowPadding.vertical)
|
.padding(.vertical, ListRowPadding.vertical)
|
||||||
|
|||||||
@@ -139,6 +139,8 @@ public struct ListRow<Icon: View, DetailsIcon: View, CustomContent: View, Select
|
|||||||
.tint(.compound.iconAccentTertiary)
|
.tint(.compound.iconAccentTertiary)
|
||||||
.foregroundStyle(isEnabled ? .compound.textPrimary : .compound.textDisabled)
|
.foregroundStyle(isEnabled ? .compound.textPrimary : .compound.textDisabled)
|
||||||
.listRowInsets(ListRowPadding.textFieldInsets)
|
.listRowInsets(ListRowPadding.textFieldInsets)
|
||||||
|
// The title is used as the placeholder, which VoiceOver only reads while empty.
|
||||||
|
.accessibilityLabel(label.title ?? "")
|
||||||
case .secureField(let text):
|
case .secureField(let text):
|
||||||
SecureField(text: text) {
|
SecureField(text: text) {
|
||||||
Text(label.title ?? "")
|
Text(label.title ?? "")
|
||||||
@@ -147,6 +149,7 @@ public struct ListRow<Icon: View, DetailsIcon: View, CustomContent: View, Select
|
|||||||
.tint(.compound.iconAccentTertiary)
|
.tint(.compound.iconAccentTertiary)
|
||||||
.foregroundStyle(isEnabled ? .compound.textPrimary : .compound.textDisabled)
|
.foregroundStyle(isEnabled ? .compound.textPrimary : .compound.textDisabled)
|
||||||
.listRowInsets(ListRowPadding.textFieldInsets)
|
.listRowInsets(ListRowPadding.textFieldInsets)
|
||||||
|
.accessibilityLabel(label.title ?? "")
|
||||||
|
|
||||||
case .custom(let content):
|
case .custom(let content):
|
||||||
content()
|
content()
|
||||||
|
|||||||
Reference in New Issue
Block a user