CXTDT-577463 - InputField - Accessibility - Format Text
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
0981bf7729
commit
649acb77af
@ -204,12 +204,23 @@ open class InputField: EntryFieldBase {
|
|||||||
if let text = titleLabel.text?.trimmingCharacters(in: .whitespaces) {
|
if let text = titleLabel.text?.trimmingCharacters(in: .whitespaces) {
|
||||||
accessibilityLabels.append(text)
|
accessibilityLabels.append(text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let formatText = textField.formatText, !formatText.isEmpty {
|
||||||
|
accessibilityLabels.append("format, \(formatText)")
|
||||||
|
}
|
||||||
|
|
||||||
|
if let placeholderText = textField.placeholder, !placeholderText.isEmpty {
|
||||||
|
accessibilityLabels.append("placeholder, \(placeholderText)")
|
||||||
|
}
|
||||||
|
|
||||||
if isReadOnly {
|
if isReadOnly {
|
||||||
accessibilityLabels.append("read only")
|
accessibilityLabels.append("read only")
|
||||||
}
|
}
|
||||||
|
|
||||||
if !isEnabled {
|
if !isEnabled {
|
||||||
accessibilityLabels.append("dimmed")
|
accessibilityLabels.append("dimmed")
|
||||||
}
|
}
|
||||||
|
|
||||||
if let errorText, showError {
|
if let errorText, showError {
|
||||||
accessibilityLabels.append("error, \(errorText)")
|
accessibilityLabels.append("error, \(errorText)")
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user