From d66d4d0e26acba3fba6e7a86f3afa0c942224b43 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 16 Oct 2024 08:39:48 -0500 Subject: [PATCH 1/2] removed surface since it isn't used anywhere Signed-off-by: Matt Bruce --- VDS/Components/Tilelet/Tilelet.swift | 2 +- VDS/Extensions/UIColor+VDSColor.swift | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/VDS/Components/Tilelet/Tilelet.swift b/VDS/Components/Tilelet/Tilelet.swift index 2109fad0..7be731a4 100644 --- a/VDS/Components/Tilelet/Tilelet.swift +++ b/VDS/Components/Tilelet/Tilelet.swift @@ -104,7 +104,7 @@ open class Tilelet: TileContainerBase, ParentViewProtocol { } private var backgroundColorSurface: Surface { - backgroundColorConfiguration.getColor(self).surface + backgroundColorConfiguration.getColor(self).isDark() ? .dark : .light } //-------------------------------------------------- diff --git a/VDS/Extensions/UIColor+VDSColor.swift b/VDS/Extensions/UIColor+VDSColor.swift index c0d69b59..5ed1b951 100644 --- a/VDS/Extensions/UIColor+VDSColor.swift +++ b/VDS/Extensions/UIColor+VDSColor.swift @@ -187,10 +187,4 @@ extension UIColor { guard let found else { return nil} return found } - - public var surface: Surface { - var greyScale: CGFloat = 0 - getWhite(&greyScale, alpha: nil) - return greyScale < 0.5 ? .dark : .light - } } From 4e581491fadc93690ddd697de3032a045ebb046b Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 16 Oct 2024 15:16:05 -0500 Subject: [PATCH 2/2] added initial actionable elements Signed-off-by: Matt Bruce --- VDS/Components/TileContainer/TileContainer.swift | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/VDS/Components/TileContainer/TileContainer.swift b/VDS/Components/TileContainer/TileContainer.swift index 86ae34a3..b8f2fbdd 100644 --- a/VDS/Components/TileContainer/TileContainer.swift +++ b/VDS/Components/TileContainer/TileContainer.swift @@ -346,8 +346,15 @@ open class TileContainerBase: View where containerView.setAccessibilityLabel(for: views) //append all children that are accessible - items.append(contentsOf: elements) - + if containerView.isAccessibilityElement { + elements.forEach({ element in + if element.accessibilityTraits.contains(.button) || element.accessibilityTraits.contains(.link) { + items.append(element) + } + }) + } else { + items.append(contentsOf: elements) + } return items } set {}