Skip to content

Commit

Permalink
Merge pull request openedx#29 from edx/Shafqat/LEARNER-10022-Accessib…
Browse files Browse the repository at this point in the history
…ility

chore: Fix Initial Accessibility Testing Issues
  • Loading branch information
rnr authored Jul 18, 2024
2 parents 0b41009 + 93e40c4 commit 9de1549
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 7 deletions.
4 changes: 3 additions & 1 deletion Core/Core/SwiftGen/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
/// Close
public static let close = CoreLocalization.tr("Localizable", "CLOSE", fallback: "Close")
/// Done
Expand All @@ -27,7 +29,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 {
Expand Down
2 changes: 2 additions & 0 deletions Core/Core/View/Base/BackNavigationButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
3 changes: 2 additions & 1 deletion Core/Core/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
"SETTINGS.DOWNLOAD_QUALITY_720_DESCRIPTION" = "Best quality";

"DONE" = "Done";
"VIEW " = "View";
"VIEW" = "View";
"BACK" = "Back";
"OK" = "Ok";
"CLOSE" = "Close";

Expand Down
3 changes: 2 additions & 1 deletion Core/Core/uk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
"SETTINGS.DOWNLOAD_QUALITY_720_DESCRIPTION" = "Best quality";

"DONE" = "Зберегти";
"VIEW " = "View";
"VIEW" = "View";
"BACK" = "Back";
"OK" = "Так";
"CLOSE" = "Close";

Expand Down
8 changes: 4 additions & 4 deletions Profile/Profile/Presentation/Settings/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -125,7 +125,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")
Expand All @@ -135,7 +135,7 @@ public struct SettingsView: View {

}
.accessibilityElement(children: .ignore)
.accessibilityLabel(ProfileLocalization.settingsVideo)
.accessibilityLabel(ProfileLocalization.datesAndCalendar)
.cardStyle(
bgColor: Theme.Colors.textInputUnfocusedBackground,
strokeColor: .clear
Expand All @@ -160,7 +160,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
Expand Down
2 changes: 2 additions & 0 deletions Profile/Profile/SwiftGen/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Profile/Profile/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
1 change: 1 addition & 0 deletions Profile/Profile/uk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"BIO" = "Біо:";
"SETTINGS" = "Налаштування";
"SETTINGS_VIDEO" = "Налаштування відео";
"DATES_AND_CALENDAR" = "Dates & Calendar";
"SUPPORT_INFO" = "Інформація про підтримку";
"CONTACT" = "Cлужби підтримки";
"TERMS" = "Умови використання";
Expand Down

0 comments on commit 9de1549

Please sign in to comment.