Updated textView to have label text for accessibility behavior
This commit is contained in:
parent
85e967c492
commit
d65df06934
@ -281,6 +281,11 @@ class TextViewEntryField: EntryField, UITextViewDelegate, ObservingTextFieldDele
|
|||||||
if model.hideBorders {
|
if model.hideBorders {
|
||||||
adjustMarginConstraints(constant: 0)
|
adjustMarginConstraints(constant: 0)
|
||||||
}
|
}
|
||||||
|
setAccessibilityString(model.title)
|
||||||
|
}
|
||||||
|
|
||||||
|
override func setAccessibilityString(_ accessibilityString: String?) {
|
||||||
|
let accessibilityString = accessibilityString ?? ""
|
||||||
|
textView.accessibilityLabel = "\(String(describing: accessibilityString)) \(self.textView.isEnabled ? "" : MVMCoreUIUtility.hardcodedString(withKey: "textfield_disabled_state") ?? "")"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -98,7 +98,6 @@ import UIKit
|
|||||||
smartInsertDeleteType = .no
|
smartInsertDeleteType = .no
|
||||||
inputAccessoryView = nil
|
inputAccessoryView = nil
|
||||||
isAccessibilityElement = true
|
isAccessibilityElement = true
|
||||||
accessibilityTraits = .staticText
|
|
||||||
font = fontStyle.getFont()
|
font = fontStyle.getFont()
|
||||||
keyboardType = .default
|
keyboardType = .default
|
||||||
isEditable = true
|
isEditable = true
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
// MARK: Textfield
|
// MARK: Textfield
|
||||||
"textfield_today_string" = "Today";
|
"textfield_today_string" = "Today";
|
||||||
"textfield_error_message" = "%@.\n The error message.\n %@";
|
"textfield_error_message" = "%@.\n The error message.\n %@";
|
||||||
|
"textView_error_message" = "%@.\n The error message.\n %@";
|
||||||
"textfield_picker_item" = " picker item";
|
"textfield_picker_item" = " picker item";
|
||||||
"textfield_regular" = " regular";
|
"textfield_regular" = " regular";
|
||||||
"textfield_disabled_state" = "disabled";
|
"textfield_disabled_state" = "disabled";
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
// Textfield
|
// Textfield
|
||||||
"textfield_today_string" = "Hoy";
|
"textfield_today_string" = "Hoy";
|
||||||
"textfield_error_message" = "%@.\n El mensaje de error.\n %@";
|
"textfield_error_message" = "%@.\n El mensaje de error.\n %@";
|
||||||
|
"textView_error_message" = "%@.\n El mensaje de error.\n %@";
|
||||||
"textfield_picker_item" = " artículo de selector";
|
"textfield_picker_item" = " artículo de selector";
|
||||||
"textfield_regular" = " regular";
|
"textfield_regular" = " regular";
|
||||||
"textfield_disabled_state" = "inactivo";
|
"textfield_disabled_state" = "inactivo";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user