Fix some accessibility modifiers (#1606)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -72,7 +72,7 @@ struct StartChatScreen: View {
|
||||
.imageScale(.small)
|
||||
}
|
||||
.buttonStyle(FormButtonStyle(accessory: .navigationLink))
|
||||
.accessibilityLabel(A11yIdentifiers.startChatScreen.createRoom)
|
||||
.accessibilityIdentifier(A11yIdentifiers.startChatScreen.createRoom)
|
||||
}
|
||||
.compoundFormSection()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user