Merge branch 'bugfix/textArea' into 'develop'

TextArea - Accessibility - input field is not receiving swipe focus

See merge request BPHV_MIPS/vds_ios!208
This commit is contained in:
Bruce, Matt R 2024-04-18 14:43:50 +00:00
commit b2302b21a5

View File

@ -160,7 +160,7 @@ open class TextArea: EntryFieldBase {
/// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations. /// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations.
open override func setup() { open override func setup() {
super.setup() super.setup()
accessibilityLabel = "TextArea" isAccessibilityElement = false
validator = FormFieldValidator<TextArea>(field: self, rules: [.init(countRule)]) validator = FormFieldValidator<TextArea>(field: self, rules: [.init(countRule)])
containerStackView.pinToSuperView(.uniform(VDSFormControls.spaceInset)) containerStackView.pinToSuperView(.uniform(VDSFormControls.spaceInset))
@ -240,9 +240,9 @@ open class TextArea: EntryFieldBase {
open override func updateAccessibility() { open override func updateAccessibility() {
super.updateAccessibility() super.updateAccessibility()
if showError { if showError {
setAccessibilityLabel(for: [titleLabel, textView, errorLabel, helperLabel]) accessibilityElements = [titleLabel, textView, icon, errorLabel, helperLabel]
} else { } else {
setAccessibilityLabel(for: [titleLabel, textView, helperLabel]) accessibilityElements = [titleLabel, textView, helperLabel]
} }
} }