From 2a421eefd951f7b78cba389a810dc0679ffdf268 Mon Sep 17 00:00:00 2001 From: Shafqat Muneer Date: Sat, 13 Jul 2024 14:21:20 +0500 Subject: [PATCH 1/3] chore: Fix Initial Accessibility Testing Issues --- Core/Core/SwiftGen/Strings.swift | 4 +++- Core/Core/View/Base/BackNavigationButton.swift | 2 ++ Core/Core/en.lproj/Localizable.strings | 3 ++- Core/Core/uk.lproj/Localizable.strings | 2 ++ Profile/Profile/Presentation/Settings/SettingsView.swift | 8 ++++---- Profile/Profile/SwiftGen/Strings.swift | 2 ++ Profile/Profile/en.lproj/Localizable.strings | 1 + Profile/Profile/uk.lproj/Localizable.strings | 1 + 8 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Core/Core/SwiftGen/Strings.swift b/Core/Core/SwiftGen/Strings.swift index 4bd41f9eb..b64a15d96 100644 --- a/Core/Core/SwiftGen/Strings.swift +++ b/Core/Core/SwiftGen/Strings.swift @@ -10,6 +10,8 @@ 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 public enum CoreLocalization { + /// back + public static let back = CoreLocalization.tr("Localizable", "BACK", fallback: "back") /// Done public static let done = CoreLocalization.tr("Localizable", "DONE", fallback: "Done") /// View in Safari @@ -21,7 +23,7 @@ public enum CoreLocalization { /// Tomorrow public static let tomorrow = CoreLocalization.tr("Localizable", "TOMORROW", fallback: "Tomorrow") /// View - public static let view = CoreLocalization.tr("Localizable", "VIEW ", fallback: "View") + public static let view = CoreLocalization.tr("Localizable", "VIEW", fallback: "View") /// Yesterday public static let yesterday = CoreLocalization.tr("Localizable", "YESTERDAY", fallback: "Yesterday") public enum Alert { diff --git a/Core/Core/View/Base/BackNavigationButton.swift b/Core/Core/View/Base/BackNavigationButton.swift index 001f5d340..415433cd1 100644 --- a/Core/Core/View/Base/BackNavigationButton.swift +++ b/Core/Core/View/Base/BackNavigationButton.swift @@ -78,6 +78,8 @@ public struct BackNavigationButton: View { public var body: some View { BackNavigationButtonRepresentable(action: action, color: color, viewModel: viewModel) + .accessibilityIdentifier("back_button") + .accessibilityLabel(CoreLocalization.back) .onAppear { viewModel.loadItems() } diff --git a/Core/Core/en.lproj/Localizable.strings b/Core/Core/en.lproj/Localizable.strings index b1fda17c5..a36bf6c5d 100644 --- a/Core/Core/en.lproj/Localizable.strings +++ b/Core/Core/en.lproj/Localizable.strings @@ -86,7 +86,8 @@ "SETTINGS.DOWNLOAD_QUALITY_720_DESCRIPTION" = "Best quality"; "DONE" = "Done"; -"VIEW " = "View"; +"VIEW" = "View"; +"BACK" = "back"; "PICKER.SEARCH" = "Search"; "PICKER.ACCEPT" = "Accept"; diff --git a/Core/Core/uk.lproj/Localizable.strings b/Core/Core/uk.lproj/Localizable.strings index 1026b82e0..c40dbca86 100644 --- a/Core/Core/uk.lproj/Localizable.strings +++ b/Core/Core/uk.lproj/Localizable.strings @@ -79,6 +79,8 @@ "SETTINGS.DOWNLOAD_QUALITY_720_DESCRIPTION" = "Best quality"; "DONE" = "Зберегти"; +"VIEW" = "View"; +"BACK" = "back"; "PICKER.SEARCH" = "Знайти"; "PICKER.ACCEPT" = "Прийняти"; diff --git a/Profile/Profile/Presentation/Settings/SettingsView.swift b/Profile/Profile/Presentation/Settings/SettingsView.swift index 590afa784..858d56606 100644 --- a/Profile/Profile/Presentation/Settings/SettingsView.swift +++ b/Profile/Profile/Presentation/Settings/SettingsView.swift @@ -29,7 +29,7 @@ public struct SettingsView: View { .resizable() .edgesIgnoringSafeArea(.top) } - .frame(maxWidth: .infinity, maxHeight: 200) + .frame(maxWidth: .infinity, maxHeight: 50) .accessibilityIdentifier("auth_bg_image") // MARK: - Page name @@ -120,7 +120,7 @@ public struct SettingsView: View { viewModel.router.showDatesAndCalendar() }, label: { HStack { - Text("Dates & Calendar") // TODO: add ProfileLocalization... + Text(ProfileLocalization.datesAndCalendar) .font(Theme.Fonts.titleMedium) Spacer() Image(systemName: "chevron.right") @@ -130,7 +130,7 @@ public struct SettingsView: View { } .accessibilityElement(children: .ignore) - .accessibilityLabel(ProfileLocalization.settingsVideo) + .accessibilityLabel(ProfileLocalization.datesAndCalendar) .cardStyle( bgColor: Theme.Colors.textInputUnfocusedBackground, strokeColor: .clear @@ -155,7 +155,7 @@ public struct SettingsView: View { .accessibilityIdentifier("video_settings_button") } .accessibilityElement(children: .ignore) - .accessibilityLabel(ProfileLocalization.settingsVideo) + .accessibilityLabel(ProfileLocalization.manageAccount) .cardStyle( bgColor: Theme.Colors.textInputUnfocusedBackground, strokeColor: .clear diff --git a/Profile/Profile/SwiftGen/Strings.swift b/Profile/Profile/SwiftGen/Strings.swift index 0cf331373..77c817387 100644 --- a/Profile/Profile/SwiftGen/Strings.swift +++ b/Profile/Profile/SwiftGen/Strings.swift @@ -18,6 +18,8 @@ public enum ProfileLocalization { public static let contact = ProfileLocalization.tr("Localizable", "CONTACT", fallback: "Contact support") /// Cookie policy public static let cookiePolicy = ProfileLocalization.tr("Localizable", "COOKIE_POLICY", fallback: "Cookie policy") + /// Dates & Calendar + public static let datesAndCalendar = ProfileLocalization.tr("Localizable", "DATES_AND_CALENDAR", fallback: "Dates & Calendar") /// Do not sell my personal information public static let doNotSellInformation = ProfileLocalization.tr("Localizable", "DO_NOT_SELL_INFORMATION", fallback: "Do not sell my personal information") /// Edit Profile diff --git a/Profile/Profile/en.lproj/Localizable.strings b/Profile/Profile/en.lproj/Localizable.strings index 9b6872159..1a4d8c607 100644 --- a/Profile/Profile/en.lproj/Localizable.strings +++ b/Profile/Profile/en.lproj/Localizable.strings @@ -14,6 +14,7 @@ "BIO" = "Bio:"; "SETTINGS" = "Settings"; "SETTINGS_VIDEO" = "Video settings"; +"DATES_AND_CALENDAR" = "Dates & Calendar"; "SUPPORT_INFO" = "Support info"; "CONTACT" = "Contact support"; "TERMS" = "Terms of use"; diff --git a/Profile/Profile/uk.lproj/Localizable.strings b/Profile/Profile/uk.lproj/Localizable.strings index a8590f765..6135ceb6f 100644 --- a/Profile/Profile/uk.lproj/Localizable.strings +++ b/Profile/Profile/uk.lproj/Localizable.strings @@ -14,6 +14,7 @@ "BIO" = "Біо:"; "SETTINGS" = "Налаштування"; "SETTINGS_VIDEO" = "Налаштування відео"; +"DATES_AND_CALENDAR" = "Dates & Calendar"; "SUPPORT_INFO" = "Інформація про підтримку"; "CONTACT" = "Cлужби підтримки"; "TERMS" = "Умови використання"; From 2e0570a5269e963290d5e3a97060f32e525e3be0 Mon Sep 17 00:00:00 2001 From: Shafqat Muneer Date: Tue, 16 Jul 2024 13:53:50 +0500 Subject: [PATCH 2/3] chore: adress review feedback --- Core/Core/en.lproj/Localizable.strings | 2 +- Core/Core/uk.lproj/Localizable.strings | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Core/en.lproj/Localizable.strings b/Core/Core/en.lproj/Localizable.strings index a36bf6c5d..b0ab2c399 100644 --- a/Core/Core/en.lproj/Localizable.strings +++ b/Core/Core/en.lproj/Localizable.strings @@ -87,7 +87,7 @@ "DONE" = "Done"; "VIEW" = "View"; -"BACK" = "back"; +"BACK" = "Back"; "PICKER.SEARCH" = "Search"; "PICKER.ACCEPT" = "Accept"; diff --git a/Core/Core/uk.lproj/Localizable.strings b/Core/Core/uk.lproj/Localizable.strings index c40dbca86..f77b80f49 100644 --- a/Core/Core/uk.lproj/Localizable.strings +++ b/Core/Core/uk.lproj/Localizable.strings @@ -80,7 +80,7 @@ "DONE" = "Зберегти"; "VIEW" = "View"; -"BACK" = "back"; +"BACK" = "Back"; "PICKER.SEARCH" = "Знайти"; "PICKER.ACCEPT" = "Прийняти"; From 91c1f6a69aebddaaefd7947271eda7b50623fa7c Mon Sep 17 00:00:00 2001 From: Shafqat Muneer Date: Wed, 17 Jul 2024 14:58:14 +0500 Subject: [PATCH 3/3] chore: address review feedback --- Core/Core/SwiftGen/Strings.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Core/SwiftGen/Strings.swift b/Core/Core/SwiftGen/Strings.swift index b64a15d96..e90c54deb 100644 --- a/Core/Core/SwiftGen/Strings.swift +++ b/Core/Core/SwiftGen/Strings.swift @@ -10,8 +10,8 @@ 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 public enum CoreLocalization { - /// back - public static let back = CoreLocalization.tr("Localizable", "BACK", fallback: "back") + /// Back + public static let back = CoreLocalization.tr("Localizable", "BACK", fallback: "Back") /// Done public static let done = CoreLocalization.tr("Localizable", "DONE", fallback: "Done") /// View in Safari