From d382613f8862367aaeb27855320839191b6cf746 Mon Sep 17 00:00:00 2001 From: JanNiklas Grabowski Date: Tue, 25 Apr 2023 13:27:37 +0200 Subject: [PATCH] MESSENGER-4518 add voiceover description --- Riot/Assets/de.lproj/Bwi.strings | 2 ++ Riot/Assets/en.lproj/Bwi.strings | 2 ++ Riot/Generated/BWIStrings.swift | 8 ++++++++ .../EnterPinCode/EnterPinCodeViewController.storyboard | 1 + .../EnterPinCode/EnterPinCodeViewController.swift | 4 +++- 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Riot/Assets/de.lproj/Bwi.strings b/Riot/Assets/de.lproj/Bwi.strings index 09bfd3421..9e69ae543 100644 --- a/Riot/Assets/de.lproj/Bwi.strings +++ b/Riot/Assets/de.lproj/Bwi.strings @@ -348,6 +348,8 @@ "pin_protection_settings_section_header_x" = "PIN"; "pin_protection_choose_pin_welcome_after_login" = "Willkommen!"; "pin_protection_choose_pin_welcome_after_register" = "Willkommen!"; +"pin_protection_reset_button_accessibility_label" = "Löschen"; +"pin_protection_reset_button_accessibility_hint" = "Löschen"; // MARK: - Biometrics Protection diff --git a/Riot/Assets/en.lproj/Bwi.strings b/Riot/Assets/en.lproj/Bwi.strings index 6e6ef3dc1..79969d1ec 100644 --- a/Riot/Assets/en.lproj/Bwi.strings +++ b/Riot/Assets/en.lproj/Bwi.strings @@ -266,6 +266,8 @@ "pin_protection_settings_section_header_x" = "PIN"; "pin_protection_choose_pin_welcome_after_login" = "Welcome!"; "pin_protection_choose_pin_welcome_after_register" = "Welcome!"; +"pin_protection_reset_button_accessibility_label" = "Delete"; +"pin_protection_reset_button_accessibility_hint" = "Delete"; // MARK: - Biometrics Protection diff --git a/Riot/Generated/BWIStrings.swift b/Riot/Generated/BWIStrings.swift index 8a9c9b5c5..651c51a57 100644 --- a/Riot/Generated/BWIStrings.swift +++ b/Riot/Generated/BWIStrings.swift @@ -947,6 +947,14 @@ public class BWIL10n: NSObject { public static var pinProtectionConfirmPinToChange: String { return BWIL10n.tr("Bwi", "pin_protection_confirm_pin_to_change") } + /// Löschen + public static var pinProtectionResetButtonAccessibilityHint: String { + return BWIL10n.tr("Bwi", "pin_protection_reset_button_accessibility_hint") + } + /// Löschen + public static var pinProtectionResetButtonAccessibilityLabel: String { + return BWIL10n.tr("Bwi", "pin_protection_reset_button_accessibility_label") + } /// PIN public static var pinProtectionSettingsSectionHeaderX: String { return BWIL10n.tr("Bwi", "pin_protection_settings_section_header_x") diff --git a/Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.storyboard b/Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.storyboard index 2530d3c2e..774f4b22e 100644 --- a/Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.storyboard +++ b/Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.storyboard @@ -328,6 +328,7 @@ + diff --git a/Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.swift b/Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.swift index f0cd056bc..e9e24480d 100644 --- a/Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.swift +++ b/Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.swift @@ -44,7 +44,7 @@ final class EnterPinCodeViewController: UIViewController { @IBOutlet private weak var explanatoryLabel: UILabel! @IBOutlet private weak var forgotPinButton: UIButton! @IBOutlet private weak var bottomView: UIView! - + @IBOutlet private weak var digitButtonReset: UIButton! // MARK: Private private var viewModel: EnterPinCodeViewModelType! @@ -87,6 +87,8 @@ final class EnterPinCodeViewController: UIViewController { if BWIBuildSettings.shared.showBUMLottieAnimation { inactiveLogoImageView.isHidden = true } + // BWI: accessibility description + digitButtonReset.vc_setupAccessibilityTraitsButton(withTitle: BWIL10n.pinProtectionResetButtonAccessibilityLabel, hint: BWIL10n.pinProtectionResetButtonAccessibilityHint, isEnabled: true) } override func viewWillAppear(_ animated: Bool) {