mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +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:
@@ -59,7 +59,7 @@ struct BugReportScreen: View {
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.vertical, 4)
|
||||
.cornerRadius(14)
|
||||
.accessibilityIdentifier("reportTextView")
|
||||
.accessibilityIdentifier(A11yIdentifiers.bugReportScreen.report)
|
||||
.scrollContentBackground(.hidden)
|
||||
|
||||
if context.reportText.isEmpty {
|
||||
@@ -84,7 +84,7 @@ struct BugReportScreen: View {
|
||||
VStack(spacing: 8) {
|
||||
Toggle(ElementL10n.bugReportScreenIncludeLogs, isOn: $context.sendingLogsEnabled)
|
||||
.tint(Color.element.brand)
|
||||
.accessibilityIdentifier("sendLogsToggle")
|
||||
.accessibilityIdentifier(A11yIdentifiers.bugReportScreen.sendLogs)
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.vertical, 11)
|
||||
.background(RoundedRectangle(cornerRadius: 14).fill(Color.element.formRowBackground))
|
||||
@@ -104,12 +104,12 @@ struct BugReportScreen: View {
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 100)
|
||||
.accessibilityIdentifier("screenshotImage")
|
||||
.accessibilityIdentifier(A11yIdentifiers.bugReportScreen.screenshot)
|
||||
Button { context.send(viewAction: .removeScreenshot) } label: {
|
||||
Image(uiImage: Asset.Images.closeCircle.image)
|
||||
}
|
||||
.offset(x: 10, y: -10)
|
||||
.accessibilityIdentifier("removeScreenshotButton")
|
||||
.accessibilityIdentifier(A11yIdentifiers.bugReportScreen.removeScreenshot)
|
||||
}
|
||||
.padding(.vertical, 16)
|
||||
.padding(.horizontal, 16)
|
||||
@@ -131,7 +131,7 @@ struct BugReportScreen: View {
|
||||
context.send(viewAction: .submit)
|
||||
}
|
||||
.disabled(context.reportText.count < 5)
|
||||
.accessibilityIdentifier("sendButton")
|
||||
.accessibilityIdentifier(A11yIdentifiers.bugReportScreen.send)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user