diff --git a/ElementX/Sources/Screens/ComposerToolbar/View/RoomAttachmentPicker.swift b/ElementX/Sources/Screens/ComposerToolbar/View/RoomAttachmentPicker.swift index 291a43cb7..6046cf2a4 100644 --- a/ElementX/Sources/Screens/ComposerToolbar/View/RoomAttachmentPicker.swift +++ b/ElementX/Sources/Screens/ComposerToolbar/View/RoomAttachmentPicker.swift @@ -40,7 +40,7 @@ struct RoomAttachmentPicker: View { } label: { PickerLabel(title: L10n.screenRoomAttachmentSourceGallery, icon: Image(systemName: "photo.fill")) } - .accessibilityLabel(A11yIdentifiers.roomScreen.attachmentPickerPhotoLibrary) + .accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerPhotoLibrary) Button { context.showAttachmentPopover = false @@ -48,7 +48,7 @@ struct RoomAttachmentPicker: View { } label: { PickerLabel(title: L10n.screenRoomAttachmentSourceFiles, icon: Image(systemName: "paperclip")) } - .accessibilityLabel(A11yIdentifiers.roomScreen.attachmentPickerDocuments) + .accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerDocuments) Button { context.showAttachmentPopover = false @@ -56,7 +56,7 @@ struct RoomAttachmentPicker: View { } label: { PickerLabel(title: L10n.screenRoomAttachmentSourceCamera, icon: Image(systemName: "camera.fill")) } - .accessibilityLabel(A11yIdentifiers.roomScreen.attachmentPickerCamera) + .accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerCamera) Button { context.showAttachmentPopover = false @@ -64,7 +64,7 @@ struct RoomAttachmentPicker: View { } label: { PickerLabel(title: L10n.screenRoomAttachmentSourceLocation, icon: Image(asset: Asset.Images.locationPin)) } - .accessibilityLabel(A11yIdentifiers.roomScreen.attachmentPickerLocation) + .accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerLocation) if ServiceLocator.shared.settings.pollsCreationEnabled { Button { diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift index 6f5888c22..a9bfae404 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift @@ -115,7 +115,7 @@ struct HomeScreen: View { HomeScreenInvitesButton(title: L10n.actionInvitesList, hasBadge: context.viewState.hasUnreadPendingInvitations) { context.send(viewAction: .selectInvites) } - .accessibilityLabel(A11yIdentifiers.homeScreen.invites) + .accessibilityIdentifier(A11yIdentifiers.homeScreen.invites) .frame(maxWidth: .infinity, alignment: .trailing) .padding(.vertical, -8.0) } @@ -175,7 +175,7 @@ struct HomeScreen: View { } label: { Image(systemName: "square.and.pencil") } - .accessibilityLabel(A11yIdentifiers.homeScreen.startChat) + .accessibilityIdentifier(A11yIdentifiers.homeScreen.startChat) } /// Often times the scroll view's content size isn't correct yet when this method is called e.g. when cancelling a search diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenUserMenuButton.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenUserMenuButton.swift index a06787ede..e07a444dc 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenUserMenuButton.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenUserMenuButton.swift @@ -29,7 +29,7 @@ struct HomeScreenUserMenuButton: View { } label: { Label(L10n.commonSettings, systemImage: "gearshape") } - .accessibilityLabel(A11yIdentifiers.homeScreen.settings) + .accessibilityIdentifier(A11yIdentifiers.homeScreen.settings) } Section { MatrixUserShareLink(userID: context.viewState.userID) { diff --git a/ElementX/Sources/Screens/Settings/SettingsScreen/View/SettingsScreen.swift b/ElementX/Sources/Screens/Settings/SettingsScreen/View/SettingsScreen.swift index 5fbf3006f..9e8aacb21 100644 --- a/ElementX/Sources/Screens/Settings/SettingsScreen/View/SettingsScreen.swift +++ b/ElementX/Sources/Screens/Settings/SettingsScreen/View/SettingsScreen.swift @@ -97,7 +97,7 @@ struct SettingsScreen: View { kind: .navigationLink { context.send(viewAction: .developerOptions) }) - .accessibilityLabel(A11yIdentifiers.settingsScreen.developerOptions) + .accessibilityIdentifier(A11yIdentifiers.settingsScreen.developerOptions) } } @@ -110,7 +110,7 @@ struct SettingsScreen: View { kind: .button { context.send(viewAction: .account) }) - .accessibilityLabel(A11yIdentifiers.settingsScreen.account) + .accessibilityIdentifier(A11yIdentifiers.settingsScreen.account) } // Message layout @@ -130,7 +130,7 @@ struct SettingsScreen: View { kind: .navigationLink { context.send(viewAction: .notifications) }) - .accessibilityLabel(A11yIdentifiers.settingsScreen.notifications) + .accessibilityIdentifier(A11yIdentifiers.settingsScreen.notifications) } // Analytics @@ -139,7 +139,7 @@ struct SettingsScreen: View { kind: .navigationLink { context.send(viewAction: .analytics) }) - .accessibilityLabel(A11yIdentifiers.settingsScreen.analytics) + .accessibilityIdentifier(A11yIdentifiers.settingsScreen.analytics) // Report Bug ListRow(label: .default(title: L10n.commonReportABug, @@ -191,7 +191,7 @@ struct SettingsScreen: View { private var doneButton: some View { Button(L10n.actionDone, action: close) - .accessibilityLabel(A11yIdentifiers.settingsScreen.done) + .accessibilityIdentifier(A11yIdentifiers.settingsScreen.done) } private func close() { diff --git a/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift b/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift index eb50bc1b6..3aa43853c 100644 --- a/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift +++ b/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift @@ -72,7 +72,7 @@ struct StartChatScreen: View { .imageScale(.small) } .buttonStyle(FormButtonStyle(accessory: .navigationLink)) - .accessibilityLabel(A11yIdentifiers.startChatScreen.createRoom) + .accessibilityIdentifier(A11yIdentifiers.startChatScreen.createRoom) } .compoundFormSection() }