From 197bdd60de50152a7b136d5a25d8e0b98cc5d9c2 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Fri, 11 Dec 2020 14:45:50 -0500 Subject: [PATCH] better test functionality. exposing accessibility for hittable. --- MVMCoreUI/Atomic/Atoms/Buttons/PillButton.swift | 2 +- MVMCoreUI/Atomic/Atoms/Selectors/Checkbox.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/MVMCoreUI/Atomic/Atoms/Buttons/PillButton.swift b/MVMCoreUI/Atomic/Atoms/Buttons/PillButton.swift index 473e033d..4a7a8481 100644 --- a/MVMCoreUI/Atomic/Atoms/Buttons/PillButton.swift +++ b/MVMCoreUI/Atomic/Atoms/Buttons/PillButton.swift @@ -104,7 +104,7 @@ open class PillButton: Button, MVMCoreUIViewConstrainingProtocol { self.disabledTitleColor = disabledTitleColor } -// isAccessibilityElement = isEnabled + isAccessibilityElement = isEnabled if isEnabled { if let fillColor = buttonModel?.enabledColors.fill { diff --git a/MVMCoreUI/Atomic/Atoms/Selectors/Checkbox.swift b/MVMCoreUI/Atomic/Atoms/Selectors/Checkbox.swift index b440adaa..0de7f3b4 100644 --- a/MVMCoreUI/Atomic/Atoms/Selectors/Checkbox.swift +++ b/MVMCoreUI/Atomic/Atoms/Selectors/Checkbox.swift @@ -353,6 +353,7 @@ import MVMCore } override open func accessibilityActivate() -> Bool { + guard isEnabled else { return false } sendActions(for: .touchUpInside) return true }