added error state in the accessibilityLabel
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
a04f9a14df
commit
80233b6797
@ -123,6 +123,7 @@ open class SelectorBase: Control, SelectorControlable {
|
||||
/// Used to update any Accessibility properties.ß
|
||||
open override func updateAccessibility() {
|
||||
super.updateAccessibility()
|
||||
accessibilityLabel = "\(Self.self)\(showError ? ", error" : "")"
|
||||
}
|
||||
|
||||
/// This will change the state of the Selector and execute the actionBlock if provided.
|
||||
|
||||
@ -190,7 +190,7 @@ open class SelectorItemBase<Selector: SelectorControlable>: Control, Errorable,
|
||||
/// Used to update any Accessibility properties.
|
||||
open override func updateAccessibility() {
|
||||
super.updateAccessibility()
|
||||
setAccessibilityLabel(for: [label, childLabel, errorLabel])
|
||||
setAccessibilityLabel(for: [selectorView, label, childLabel, errorLabel])
|
||||
}
|
||||
|
||||
/// Resets to default settings.
|
||||
|
||||
@ -42,7 +42,6 @@ open class Checkbox: SelectorBase {
|
||||
/// 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()
|
||||
accessibilityLabel = "Checkbox"
|
||||
|
||||
backgroundColorConfiguration.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: .selected)
|
||||
backgroundColorConfiguration.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: [.selected, .highlighted])
|
||||
@ -71,7 +70,7 @@ open class Checkbox: SelectorBase {
|
||||
isSelected.toggle()
|
||||
sendActions(for: .valueChanged)
|
||||
}
|
||||
|
||||
|
||||
open override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user