diff --git a/ElementX/Resources/Localizations/en.lproj/Untranslated.strings b/ElementX/Resources/Localizations/en.lproj/Untranslated.strings index fd08b9612..8c6c8093a 100644 --- a/ElementX/Resources/Localizations/en.lproj/Untranslated.strings +++ b/ElementX/Resources/Localizations/en.lproj/Untranslated.strings @@ -21,19 +21,9 @@ "session_verification_screen_emojis_title" = "Lets check if these"; "session_verification_screen_emojis_message" = "Open Element on one of your other sessions to compare."; -// MARK: - Authentication - -"authentication_login_title" = "Welcome back!"; -"authentication_login_forgot_password" = "Forgot password"; - -"authentication_server_info_title" = "Choose your server to store your data"; -"authentication_server_info_matrix_description" = "Join millions for free on the largest public server"; - -"server_selection_title" = "Choose your server"; -"server_selection_message" = "What is the address of your server? A server is like a home for all your data."; -"server_selection_server_url" = "Server URL"; "server_selection_server_footer" = "You can only connect to a server that has already been set up"; -"server_selection_generic_error" = "Cannot find a server at this URL, please check it is correct."; "login_mobile_device" = "Mobile"; "login_tablet_device" = "Tablet"; + +"a11y_all_chats_user_avatar_menu" = "Main menu"; diff --git a/ElementX/Sources/Generated/Strings+Untranslated.swift b/ElementX/Sources/Generated/Strings+Untranslated.swift index bc41d2689..ffc6f997c 100644 --- a/ElementX/Sources/Generated/Strings+Untranslated.swift +++ b/ElementX/Sources/Generated/Strings+Untranslated.swift @@ -10,18 +10,12 @@ import Foundation // swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length // swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces extension ElementL10n { + /// Main menu + public static let a11yAllChatsUserAvatarMenu = ElementL10n.tr("Untranslated", "a11y_all_chats_user_avatar_menu") /// Confirm public static let actionConfirm = ElementL10n.tr("Untranslated", "action_confirm") /// Match public static let actionMatch = ElementL10n.tr("Untranslated", "action_match") - /// Forgot password - public static let authenticationLoginForgotPassword = ElementL10n.tr("Untranslated", "authentication_login_forgot_password") - /// Welcome back! - public static let authenticationLoginTitle = ElementL10n.tr("Untranslated", "authentication_login_title") - /// Join millions for free on the largest public server - public static let authenticationServerInfoMatrixDescription = ElementL10n.tr("Untranslated", "authentication_server_info_matrix_description") - /// Choose your server to store your data - public static let authenticationServerInfoTitle = ElementL10n.tr("Untranslated", "authentication_server_info_title") /// Mobile public static let loginMobileDevice = ElementL10n.tr("Untranslated", "login_mobile_device") /// Tablet @@ -40,16 +34,8 @@ extension ElementL10n { public static let screenshotDetectedMessage = ElementL10n.tr("Untranslated", "screenshot_detected_message") /// You took a screenshot public static let screenshotDetectedTitle = ElementL10n.tr("Untranslated", "screenshot_detected_title") - /// Cannot find a server at this URL, please check it is correct. - public static let serverSelectionGenericError = ElementL10n.tr("Untranslated", "server_selection_generic_error") - /// What is the address of your server? A server is like a home for all your data. - public static let serverSelectionMessage = ElementL10n.tr("Untranslated", "server_selection_message") /// You can only connect to a server that has already been set up public static let serverSelectionServerFooter = ElementL10n.tr("Untranslated", "server_selection_server_footer") - /// Server URL - public static let serverSelectionServerUrl = ElementL10n.tr("Untranslated", "server_selection_server_url") - /// Choose your server - public static let serverSelectionTitle = ElementL10n.tr("Untranslated", "server_selection_title") /// Looks like you’re using a new device. Verify its you. public static let sessionVerificationBannerMessage = ElementL10n.tr("Untranslated", "session_verification_banner_message") /// Help keep your messages secure diff --git a/ElementX/Sources/Screens/Authentication/LoginScreen/View/LoginScreen.swift b/ElementX/Sources/Screens/Authentication/LoginScreen/View/LoginScreen.swift index a4a843aa2..5cc71be38 100644 --- a/ElementX/Sources/Screens/Authentication/LoginScreen/View/LoginScreen.swift +++ b/ElementX/Sources/Screens/Authentication/LoginScreen/View/LoginScreen.swift @@ -64,7 +64,7 @@ struct LoginScreen: View { /// The header containing a Welcome Back title. var header: some View { - Text(ElementL10n.authenticationLoginTitle) + Text(ElementL10n.ftueAuthWelcomeBackTitle) .font(.element.title2Bold) .multilineTextAlignment(.center) .foregroundColor(.element.primaryContent) @@ -102,7 +102,7 @@ struct LoginScreen: View { .accessibilityIdentifier("passwordTextField") Button { context.send(viewAction: .forgotPassword) } label: { - Text(ElementL10n.authenticationLoginForgotPassword) + Text(ElementL10n.ftueAuthForgotPassword) .font(.element.body) } .frame(maxWidth: .infinity, alignment: .trailing) diff --git a/ElementX/Sources/Screens/Authentication/LoginScreen/View/LoginServerInfoSection.swift b/ElementX/Sources/Screens/Authentication/LoginScreen/View/LoginServerInfoSection.swift index 649207118..2a7e950fe 100644 --- a/ElementX/Sources/Screens/Authentication/LoginScreen/View/LoginServerInfoSection.swift +++ b/ElementX/Sources/Screens/Authentication/LoginScreen/View/LoginServerInfoSection.swift @@ -30,7 +30,7 @@ struct LoginServerInfoSection: View { var body: some View { VStack(alignment: .leading, spacing: 4) { - Text(ElementL10n.authenticationServerInfoTitle) + Text(ElementL10n.ftueAuthSignInChooseServerHeader) .font(.element.subheadline) .foregroundColor(.element.secondaryContent) diff --git a/ElementX/Sources/Screens/Authentication/ServerSelection/View/ServerSelectionScreen.swift b/ElementX/Sources/Screens/Authentication/ServerSelection/View/ServerSelectionScreen.swift index 2b4917fa8..07d24dc3c 100644 --- a/ElementX/Sources/Screens/Authentication/ServerSelection/View/ServerSelectionScreen.swift +++ b/ElementX/Sources/Screens/Authentication/ServerSelection/View/ServerSelectionScreen.swift @@ -52,12 +52,12 @@ struct ServerSelectionScreen: View { AuthenticationIconImage(image: Asset.Images.serverSelectionIcon) .padding(.bottom, 8) - Text(ElementL10n.serverSelectionTitle) + Text(ElementL10n.ftueAuthChooseServerTitle) .font(.element.title2Bold) .multilineTextAlignment(.center) .foregroundColor(.element.primaryContent) - Text(ElementL10n.serverSelectionMessage) + Text(ElementL10n.ftueAuthChooseServerSubtitle) .font(.element.body) .multilineTextAlignment(.center) .foregroundColor(.element.secondaryContent) @@ -67,7 +67,7 @@ struct ServerSelectionScreen: View { /// The text field and confirm button where the user enters a server URL. var serverForm: some View { VStack(alignment: .leading, spacing: 12) { - TextField(ElementL10n.serverSelectionServerUrl, text: $context.homeserverAddress) + TextField(ElementL10n.ftueAuthChooseServerEntryHint, text: $context.homeserverAddress) .focused($isTextFieldFocused) .textFieldStyle(.elementInput(footerText: context.viewState.footerMessage, isError: context.viewState.isShowingFooterError)) diff --git a/ElementX/Sources/Screens/Authentication/SoftLogout/View/SoftLogoutScreen.swift b/ElementX/Sources/Screens/Authentication/SoftLogout/View/SoftLogoutScreen.swift index 0dd85946e..3e0f95af6 100644 --- a/ElementX/Sources/Screens/Authentication/SoftLogout/View/SoftLogoutScreen.swift +++ b/ElementX/Sources/Screens/Authentication/SoftLogout/View/SoftLogoutScreen.swift @@ -96,7 +96,7 @@ struct SoftLogoutScreen: View { .accessibilityIdentifier("passwordTextField") Button { context.send(viewAction: .forgotPassword) } label: { - Text(ElementL10n.authenticationLoginForgotPassword) + Text(ElementL10n.ftueAuthForgotPassword) .font(.element.body) } .frame(maxWidth: .infinity, alignment: .trailing) diff --git a/ElementX/Sources/Screens/BugReport/View/BugReportScreen.swift b/ElementX/Sources/Screens/BugReport/View/BugReportScreen.swift index 349a59bc3..3be02fac6 100644 --- a/ElementX/Sources/Screens/BugReport/View/BugReportScreen.swift +++ b/ElementX/Sources/Screens/BugReport/View/BugReportScreen.swift @@ -49,7 +49,6 @@ struct BugReportScreen: View { } .navigationTitle(ElementL10n.titleActivityBugReport) } - .background(Color.element.background, ignoresSafeAreaEdges: .all) } /// The main content of the view to be shown in a scroll view. diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift index 94dd965a7..b072aa406 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift @@ -91,6 +91,7 @@ struct HomeScreen: View { } message: { Text(ElementL10n.actionSignOutConfirmationSimple) } + .accessibilityLabel(ElementL10n.a11yAllChatsUserAvatarMenu) } @ViewBuilder diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomCell.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomCell.swift index 64c014fbb..bc8320eeb 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomCell.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomCell.swift @@ -33,10 +33,12 @@ struct HomeScreenRoomCell: View { .scaledToFill() .frame(width: avatarSize, height: avatarSize) .clipShape(Circle()) + .accessibilityHidden(true) } else { PlaceholderAvatarImage(text: room.name, contentId: room.id) .clipShape(Circle()) .frame(width: avatarSize, height: avatarSize) + .accessibilityHidden(true) } HStack(alignment: .top) { @@ -76,6 +78,7 @@ struct HomeScreenRoomCell: View { } } .frame(minHeight: 64.0) + .accessibilityElement(children: .combine) .task { context.send(viewAction: .loadRoomData(roomIdentifier: room.id)) } diff --git a/ElementX/Sources/Screens/RoomScreen/View/RoomHeaderView.swift b/ElementX/Sources/Screens/RoomScreen/View/RoomHeaderView.swift index 628e49ec3..c1faf365a 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/RoomHeaderView.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/RoomHeaderView.swift @@ -26,6 +26,7 @@ struct RoomHeaderView: View { var body: some View { HStack(spacing: 8) { roomAvatar + .accessibilityHidden(true) Text(context.viewState.roomTitle) .font(.element.headline) .accessibilityIdentifier("roomNameLabel") diff --git a/ElementX/Sources/Screens/RoomScreen/View/Style/TimelineItemBubbledStylerView.swift b/ElementX/Sources/Screens/RoomScreen/View/Style/TimelineItemBubbledStylerView.swift index 27cfa6e20..40ef28b38 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/Style/TimelineItemBubbledStylerView.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/Style/TimelineItemBubbledStylerView.swift @@ -60,12 +60,14 @@ struct TimelineItemBubbledStylerView: View { .frame(height: 8) HStack(alignment: .top, spacing: 4) { TimelineSenderAvatarView(timelineItem: timelineItem) + .accessibilityHidden(true) Text(timelineItem.senderDisplayName ?? timelineItem.senderId) .font(.element.footnoteBold) .foregroundColor(.element.primaryContent) .lineLimit(1) .padding(.vertical, senderNameVerticalPadding) } + .accessibilityElement(children: .combine) } } } @@ -75,6 +77,7 @@ struct TimelineItemBubbledStylerView: View { // the centre aligned stroke width so we use -5 here VStack(alignment: alignment, spacing: -5) { styledContent + .accessibilityElement(children: .combine) if !timelineItem.properties.reactions.isEmpty { TimelineReactionsView(reactions: timelineItem.properties.reactions, @@ -98,14 +101,13 @@ struct TimelineItemBubbledStylerView: View { @ViewBuilder var styledContentOutgoing: some View { - if timelineItem.inGroupState == .single || timelineItem.inGroupState == .beginning { - Spacer() - .frame(height: 8) - } + let topPadding: CGFloat? = timelineItem.inGroupState == .single || timelineItem.inGroupState == .beginning ? 8 : 0 + if shouldAvoidBubbling { content() .frame(width: bubbleWidth) .cornerRadius(12, inGroupState: timelineItem.inGroupState) + .padding(.top, topPadding) } else { VStack(alignment: .trailing, spacing: 4) { content() @@ -120,6 +122,7 @@ struct TimelineItemBubbledStylerView: View { .padding(EdgeInsets(top: 6, leading: 12, bottom: 6, trailing: 12)) .background(Color.element.systemGray5) .cornerRadius(12, inGroupState: timelineItem.inGroupState) + .padding(.top, topPadding) } } @@ -171,7 +174,7 @@ struct TimelineItemBubbledStylerView_Previews: PreviewProvider { @ViewBuilder static var body: some View { - VStack(alignment: .leading) { + VStack(alignment: .leading, spacing: 2) { ForEach(1..