mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Align accessibility IDs with elementX android (#567)
* Rename onboarding and login user/pass accessibility ids. * Refactor remaining server change accessibility IDs * Avoid accessibilityIdentifier spreading to all decorations on the textBox. Required because otherwise there are multiple items tagged with the accessibilityId which means we can't click on "the" item. * Move all accessibility identifiers to `AccessibilityIdentifiers.swft` - use same naming convention on all of them - remove the unused ones - fix build errors in integration tests and invalid identifiers (still broken until autodiscovery lands on rosa) --------- Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
This commit is contained in:
+4
-4
@@ -62,21 +62,21 @@ struct ServerSelectionScreen: View {
|
||||
TextField(ElementL10n.ftueAuthChooseServerEntryHint, text: $context.homeserverAddress)
|
||||
.textFieldStyle(.elementInput(labelText: ElementL10n.hsUrl,
|
||||
footerText: context.viewState.footerMessage,
|
||||
isError: context.viewState.isShowingFooterError))
|
||||
isError: context.viewState.isShowingFooterError,
|
||||
accessibilityIdentifier: A11yIdentifiers.changeServerScreen.server))
|
||||
.keyboardType(.URL)
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.onChange(of: context.homeserverAddress) { _ in context.send(viewAction: .clearFooterError) }
|
||||
.submitLabel(.done)
|
||||
.onSubmit(submit)
|
||||
.accessibilityIdentifier("addressTextField")
|
||||
|
||||
Button(action: submit) {
|
||||
Text(context.viewState.buttonTitle)
|
||||
}
|
||||
.buttonStyle(.elementAction(.xLarge))
|
||||
.disabled(context.viewState.hasValidationError)
|
||||
.accessibilityIdentifier("confirmButton")
|
||||
.accessibilityIdentifier(A11yIdentifiers.changeServerScreen.continue)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ struct ServerSelectionScreen: View {
|
||||
Button { context.send(viewAction: .dismiss) } label: {
|
||||
Text(ElementL10n.actionCancel)
|
||||
}
|
||||
.accessibilityIdentifier("dismissButton")
|
||||
.accessibilityIdentifier(A11yIdentifiers.changeServerScreen.dismiss)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user