From c1f2aa65919d28b1cf7c046ea86828432173040b Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 14 Jun 2024 11:33:59 -0500 Subject: [PATCH] refactored textarea Signed-off-by: Matt Bruce --- VDS/Components/TextFields/TextArea/TextArea.swift | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/VDS/Components/TextFields/TextArea/TextArea.swift b/VDS/Components/TextFields/TextArea/TextArea.swift index 90e797a4..79e7b825 100644 --- a/VDS/Components/TextFields/TextArea/TextArea.swift +++ b/VDS/Components/TextFields/TextArea/TextArea.swift @@ -137,7 +137,8 @@ open class TextArea: EntryFieldBase { /// 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() - + containerView.isAccessibilityElement = true + textView.isAccessibilityElement = false textView.isScrollEnabled = true textView.autocorrectionType = .no @@ -194,8 +195,9 @@ open class TextArea: EntryFieldBase { open override func updateAccessibility() { super.updateAccessibility() - textView.accessibilityLabel = accessibilityLabelText - textView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." + containerView.accessibilityLabel = "\(Self.self), \(accessibilityLabelText)" + containerView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." + containerView.accessibilityValue = value } override func updateRules() { @@ -225,7 +227,7 @@ open class TextArea: EntryFieldBase { open override var accessibilityElements: [Any]? { get { var elements = [Any]() - elements.append(contentsOf: [titleLabel, textView]) + elements.append(contentsOf: [titleLabel, containerView]) if showError { elements.append(statusIcon)