summaryrefslogtreecommitdiff
path: root/TalerWallet1/Controllers/DebugViewC.swift
diff options
context:
space:
mode:
Diffstat (limited to 'TalerWallet1/Controllers/DebugViewC.swift')
-rw-r--r--TalerWallet1/Controllers/DebugViewC.swift12
1 files changed, 12 insertions, 0 deletions
diff --git a/TalerWallet1/Controllers/DebugViewC.swift b/TalerWallet1/Controllers/DebugViewC.swift
index 9680f8f..50cbdca 100644
--- a/TalerWallet1/Controllers/DebugViewC.swift
+++ b/TalerWallet1/Controllers/DebugViewC.swift
@@ -127,6 +127,10 @@ struct DebugViewV: View {
.foregroundColor(.red)
.font(.system(size: 11)) // no accessibilityFont
.monospacedDigit()
+ .id("viewID")
+ .accessibilityLabel(Text("View.ID.", comment: "AccessibilityLabel"))
+ .accessibilityValue(viewIDString)
+ .accessibilityHint("Shows which view you currently are on.")
Spacer()
}
.edgesIgnoringSafeArea(.top)
@@ -146,13 +150,21 @@ class DebugViewC: ObservableObject {
@Published var viewID: Int = 0
@Published var sheetID: Int = 0
+ func announce(this: String) {
+ if UIAccessibility.isVoiceOverRunning {
+ UIAccessibility.post(notification: .screenChanged, argument: this)
+ }
+ }
+
@MainActor func setViewID(_ newID: Int, stack: CallStack) -> Void {
if developerMode {
if viewID == 0 {
logger.log("switching ON, \(newID, privacy: .public)")
viewID = newID // publish ON
+ announce(this: "Current view is: \(newID).")
} else if viewID != newID {
logger.log("switching from \(self.viewID, privacy: .public) to \(newID, privacy: .public)")
+ announce(this: "View switched from \(self.viewID) to \(newID).")
viewID = newID // publish new viewID
} else {
logger.log("\(newID, privacy: .public) stays")