updated logic for statusIcon label

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-06-25 13:46:00 -05:00
parent 0ec165701b
commit 0981bf7729
2 changed files with 15 additions and 0 deletions

View File

@ -344,6 +344,11 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable {
guard let self else { return "" }
return value
}
statusIcon.bridge_accessibilityLabelBlock = { [weak self] in
guard let self else { return "" }
return showError || hasInternalError ? "error" : nil
}
}
/// Updates the UI

View File

@ -223,6 +223,16 @@ open class InputField: EntryFieldBase {
return accessibilityLabels.joined(separator: ", ")
}
statusIcon.bridge_accessibilityLabelBlock = { [weak self] in
guard let self else { return "" }
if showError {
return "error"
} else if showSuccess {
return "success"
} else {
return nil
}
}
}
open override func getFieldContainer() -> UIView {