Associate the room address field helper text and error with the field

The address field already had an accessibility label, but the section's
helper text and validation error were only shown in a separate footer and
weren't conveyed to VoiceOver when focusing the field. Compose them into the
field's accessibility hint.

Addresses #5258.
This commit is contained in:
Mauro Romito
2026-06-22 12:57:49 +02:00
committed by Mauro
parent 87d18fe8e3
commit ed58120fd3
3 changed files with 19 additions and 5 deletions
@@ -16,7 +16,9 @@ struct EditRoomAddressScreen: View {
Form {
Section {
EditRoomAddressListRow(aliasLocalPart: $context.desiredAliasLocalPart,
serverName: context.viewState.serverName, shouldDisplayError: context.viewState.aliasErrors.errorDescription != nil)
serverName: context.viewState.serverName,
errorDescription: context.viewState.aliasErrors.errorDescription,
footerText: L10n.screenEditRoomAddressRoomAddressSectionFooter)
.onChange(of: context.desiredAliasLocalPart) { _, newAliasLocalPart in
context.desiredAliasLocalPart = newAliasLocalPart.lowercased()
}