From 093bd758714493d5209ad6e61fc3d531fec0e17d Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 5 Jan 2024 12:45:24 -0600 Subject: [PATCH] ONEAPP-6239 - Loader isActive still showing when false with accessibility Signed-off-by: Matt Bruce --- VDS/Components/Loader/Loader.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VDS/Components/Loader/Loader.swift b/VDS/Components/Loader/Loader.swift index 234246b0..e10c60b1 100644 --- a/VDS/Components/Loader/Loader.swift +++ b/VDS/Components/Loader/Loader.swift @@ -96,7 +96,9 @@ open class Loader: View { private let rotationLayerName = "rotationAnimation" private func startAnimating() { accessibilityLabel = "Loading" - + isAccessibilityElement = true + icon.isHidden = false + icon.layer.remove(layerName: rotationLayerName) let rotation : CABasicAnimation = CABasicAnimation(keyPath: "transform.rotation.z") rotation.fromValue = 0 @@ -115,6 +117,8 @@ open class Loader: View { } private func stopAnimating() { + isAccessibilityElement = false + icon.isHidden = true icon.layer.removeAnimation(forKey: rotationLayerName) loadingTimer?.invalidate() loadingTimer = nil