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:
Michael Kaye
2023-02-15 05:53:04 +00:00
committed by GitHub
parent 21154c7eef
commit a06365517c
29 changed files with 215 additions and 141 deletions
@@ -117,7 +117,7 @@ struct HomeScreen: View {
contentID: context.viewState.userID,
avatarSize: .user(on: .home),
imageProvider: context.imageProvider)
.accessibilityIdentifier("userAvatarImage")
.accessibilityIdentifier(A11yIdentifiers.homeScreen.userAvatar)
}
.alert(ElementL10n.actionSignOut,
isPresented: $showingLogoutConfirmation) {
@@ -38,7 +38,7 @@ struct HomeScreenRoomCell: View {
.accessibilityElement(children: .combine)
}
.buttonStyle(HomeScreenRoomCellButtonStyle())
.accessibilityIdentifier("roomName:\(room.name)")
.accessibilityIdentifier(A11yIdentifiers.homeScreen.roomName(room.name))
.overlay(alignment: .bottom) {
Divider()
.frame(height: 0.5)