From 94a505d20ec0fc978deba614900fb07f3a2c2127 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 15 Dec 2023 13:04:46 -0600 Subject: [PATCH 1/4] ensure any buttonBase in ButtonGroup is 1 line only Signed-off-by: Matt Bruce --- VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift b/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift index 665813b9..273f11ff 100644 --- a/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift +++ b/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift @@ -149,7 +149,15 @@ open class ButtonGroup: View { case .percentage(let value): percentage = value } } - buttons.forEach { if let width { ($0 as? Button)?.width = .value(width) } } + buttons.forEach { buttonBase in + //only allow 1 line for any button + buttonBase.titleLabel?.numberOfLines = 1 + buttonBase.titleLabel?.lineBreakMode = .byTruncatingTail + + if let width { + (buttonBase as? Button)?.width = .value(width) + } + } positionLayout.buttonPercentage = percentage collectionView.reloadData() From 8b69c3eb15881b7b91254ef45edd0124ca13a728 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 15 Dec 2023 14:04:27 -0600 Subject: [PATCH 2/4] ONEAPP-6239 - Loader Voice Over Fixes Signed-off-by: Matt Bruce --- VDS/Components/Loader/Loader.swift | 31 +++++++++++++++++++++------- VDS/SupportingFiles/ReleaseNotes.txt | 4 ++++ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/VDS/Components/Loader/Loader.swift b/VDS/Components/Loader/Loader.swift index 87604a94..cecf9930 100644 --- a/VDS/Components/Loader/Loader.swift +++ b/VDS/Components/Loader/Loader.swift @@ -35,7 +35,8 @@ open class Loader: View { private var icon = Icon().with { $0.name = .loader } private var opacity: CGFloat = 0.8 private var iconColorConfiguration = SurfaceColorConfiguration(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark) - + private var loadingTimer: Timer? + //-------------------------------------------------- // MARK: - Public Properties //-------------------------------------------------- @@ -59,8 +60,9 @@ open class Loader: View { /// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations. open override func setup() { super.setup() - addSubview(icon) - + addSubview(icon) + isAccessibilityElement = true + icon.isAccessibilityElement = false icon .pinTopGreaterThanOrEqualTo() .pinLeadingGreaterThanOrEqualTo() @@ -85,22 +87,37 @@ open class Loader: View { } } + open override func updateAccessibility() { + } + //-------------------------------------------------- // MARK: - Private Methods //-------------------------------------------------- private let rotationLayerName = "rotationAnimation" private func startAnimating() { + accessibilityLabel = "Loading" + icon.layer.remove(layerName: rotationLayerName) let rotation : CABasicAnimation = CABasicAnimation(keyPath: "transform.rotation.z") - rotation.toValue = NSNumber(value: Double.pi * 2) - rotation.duration = 0.5 // the speed of the rotation - rotation.isCumulative = true - rotation.repeatCount = Float.greatestFiniteMagnitude + rotation.fromValue = 0 + rotation.toValue = Double.pi * 2 + rotation.duration = 0.5 + rotation.repeatCount = .infinity icon.layer.add(rotation, forKey: rotationLayerName) + + // Focus VoiceOver on this view + UIAccessibility.post(notification: .layoutChanged, argument: self) + + loadingTimer = Timer.scheduledTimer(withTimeInterval: 20, repeats: true) { [weak self] _ in + self?.accessibilityLabel = "Still Loading" + UIAccessibility.post(notification: .announcement, argument: "Still Loading") + } } private func stopAnimating() { icon.layer.removeAnimation(forKey: rotationLayerName) + loadingTimer?.invalidate() + loadingTimer = nil } } diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 19aafae3..0a5a3694 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,3 +1,7 @@ +1.0.49 +---------------- +- ONEAPP-6239 - Loader Voice Over Fixes + 1.0.48 ---------------- - ONEAPP-4683 - Accessibility - Tabs (Voice Over) From 7b2e7f3c4f0e652a9a976d37ae85fa232be87695 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 15 Dec 2023 14:07:35 -0600 Subject: [PATCH 3/4] moved to 60 seconds Signed-off-by: Matt Bruce --- VDS/Components/Loader/Loader.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/Loader/Loader.swift b/VDS/Components/Loader/Loader.swift index cecf9930..f1f99cc9 100644 --- a/VDS/Components/Loader/Loader.swift +++ b/VDS/Components/Loader/Loader.swift @@ -108,7 +108,7 @@ open class Loader: View { // Focus VoiceOver on this view UIAccessibility.post(notification: .layoutChanged, argument: self) - loadingTimer = Timer.scheduledTimer(withTimeInterval: 20, repeats: true) { [weak self] _ in + loadingTimer = Timer.scheduledTimer(withTimeInterval: 60, repeats: true) { [weak self] _ in self?.accessibilityLabel = "Still Loading" UIAccessibility.post(notification: .announcement, argument: "Still Loading") } From 999a6e272db6cd4d9fa335dd9cc440826d00749e Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 15 Dec 2023 15:14:35 -0600 Subject: [PATCH 4/4] updated version Signed-off-by: Matt Bruce --- VDS.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index cf9c5557..2fa6d2c5 100644 --- a/VDS.xcodeproj/project.pbxproj +++ b/VDS.xcodeproj/project.pbxproj @@ -1233,7 +1233,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 48; + CURRENT_PROJECT_VERSION = 49; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1270,7 +1270,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 48; + CURRENT_PROJECT_VERSION = 49; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1;