refactored textarea
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
9538912a72
commit
c1f2aa6591
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user