From e1f248875eb1682bc6cd0aa90607ed9bb0e90002 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Fri, 15 Mar 2024 21:08:11 +0000 Subject: [PATCH] Revert "Merge branch 'bugfix/PRODDEF-24073' into 'release/11_4_0'" This reverts merge request !1062 --- MVMCoreUI/Atomic/Atoms/Views/CheckboxLabel.swift | 11 +++++------ MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift | 3 --- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabel.swift b/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabel.swift index 10b0a105..965656a6 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabel.swift @@ -43,6 +43,7 @@ addSubview(label) label.text = "" + checkbox.leadingAnchor.constraint(equalTo: layoutMarginsGuide.leadingAnchor).isActive = true checkboxBottomConstraint = layoutMarginsGuide.bottomAnchor.constraint(equalTo: checkbox.bottomAnchor) @@ -63,8 +64,9 @@ bottomLabelConstraint.isActive = true alignCheckbox(.center) - isAccessibilityElement = false - accessibilityElements = [checkbox, label] + isAccessibilityElement = true + accessibilityHint = checkbox.accessibilityHint + accessibilityTraits = checkbox.accessibilityTraits observation = observe(\.checkbox.isSelected, options: [.new]) { [weak self] _, _ in self?.updateAccessibilityLabel() } @@ -137,9 +139,6 @@ open func updateAccessibilityLabel() { checkbox.updateAccessibilityLabel() - - if let text = label.text { - checkbox.accessibilityLabel?.append(", \(text)") - } + accessibilityLabel = [checkbox.accessibilityLabel, label.text].compactMap { $0 }.joined(separator: ",") } } diff --git a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift index adc88cb4..b394993a 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift @@ -209,9 +209,6 @@ public typealias ActionBlock = () -> () if let newFont = UIFont(name: fontName, size: fontSize ?? standardFontSize) { font = newFont } - } else if let fontSize = viewModel.fontSize { - standardFontSize = fontSize - font = textStyle.font.withSize(fontSize) } if let color = viewModel.textColor {