Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
martenrebane committed Jan 24, 2024
1 parent d4c7aee commit 874acab
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 298 deletions.
6 changes: 5 additions & 1 deletion MoppApp/MoppApp/CertificateDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ class CertificateDetailViewController: MoppViewController {
UIAccessibility.post(notification: .layoutChanged, argument: navigationItem.leftBarButtonItem)
}
}


@objc internal override func backAction() {
dismiss(animated: true)
}

func setCertificateDetails() -> Void {
certificateSections.append(CertificateSection(header: L(.subjectName), certificateDetail: [
CertificateDetail(title: L(.countryOrRegion), value: certificateDetail?.x509Certificate?.subject(oid: .countryName)?[0] ?? ""),
Expand Down
5 changes: 5 additions & 0 deletions MoppApp/MoppApp/LocalizationKeys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -493,4 +493,9 @@ enum LocKey : String
case voiceControlDisableDefaultTimestampingService = "voice-control-disable-default-timestamping-service";
case voiceControlEnableRoleAndAddress = "voice-control-enable-role-and-address";
case voiceControlDisableRoleAndAddress = "voice-control-disable-role-and-address";
case voiceControlHelpButton = "voice-control-help-button";
case voiceControlAccessibilityButton = "voice-control-accessibility-button";
case voiceControlSettingsButton = "voice-control-settings-button";
case voiceControlInfoButton = "voice-control-info-button";
case voiceControlDiagnosticsButton = "voice-control-diagnostics-button";
}
20 changes: 20 additions & 0 deletions MoppApp/MoppApp/MenuViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ extension MenuViewController : UITableViewDataSource {
} else {
cell.accessibilityTraits = UIAccessibilityTraits.button
}

// Support Voice Control without setting the whole cell as VoiceOver element
cell.isAccessibilityElement = !UIAccessibility.isVoiceOverRunning
cell.accessibilityUserInputLabels = [getVoiceControlLabel(title: title)]
return cell
}
}
Expand Down Expand Up @@ -191,6 +195,22 @@ extension MenuViewController : UITableViewDelegate {
}
}

func getVoiceControlLabel(title: String) -> String {
if title == L(.menuHelp) {
return L(.voiceControlHelpButton)
} else if title == L(.menuAccessibility) {
return L(.voiceControlAccessibilityButton)
} else if title == L(.menuSettings) {
return L(.voiceControlSettingsButton)
} else if title == L(.menuAbout) {
return L(.voiceControlInfoButton)
} else if title == L(.menuDiagnostics) {
return L(.voiceControlDiagnosticsButton)
}

return ""
}

}

extension MenuViewController : MenuHeaderDelegate {
Expand Down
318 changes: 21 additions & 297 deletions MoppApp/MoppApp/Settings.storyboard

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions MoppApp/MoppApp/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -536,3 +536,8 @@
"voice-control-disable-default-timestamping-service" = "Disable default TimeStamping service access";
"voice-control-enable-role-and-address" = "Enable role and address";
"voice-control-disable-role-and-address" = "Disable role and address";
"voice-control-help-button" = "Help";
"voice-control-accessibility-button" = "Accessibility";
"voice-control-settings-button" = "Settings";
"voice-control-info-button" = "Info";
"voice-control-diagnostics-button" = "Diagnostics";
5 changes: 5 additions & 0 deletions MoppApp/MoppApp/et.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -536,3 +536,8 @@
"voice-control-disable-default-timestamping-service" = "Disable default TimeStamping service access";
"voice-control-enable-role-and-address" = "Enable role and address";
"voice-control-disable-role-and-address" = "Disable role and address";
"voice-control-help-button" = "Help";
"voice-control-accessibility-button" = "Accessibility";
"voice-control-settings-button" = "Settings";
"voice-control-info-button" = "Info";
"voice-control-diagnostics-button" = "Diagnostics";
5 changes: 5 additions & 0 deletions MoppApp/MoppApp/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -537,3 +537,8 @@
"voice-control-disable-default-timestamping-service" = "Disable default TimeStamping service access";
"voice-control-enable-role-and-address" = "Enable role and address";
"voice-control-disable-role-and-address" = "Disable role and address";
"voice-control-help-button" = "Help";
"voice-control-accessibility-button" = "Accessibility";
"voice-control-settings-button" = "Settings";
"voice-control-info-button" = "Info";
"voice-control-diagnostics-button" = "Diagnostics";

0 comments on commit 874acab

Please sign in to comment.