updates and revision
This commit is contained in:
parent
0dc3298942
commit
9620548a43
@ -19,14 +19,14 @@ import UIKit
|
||||
widthConstraint?.constant = diameter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override var isSelected: Bool {
|
||||
didSet {
|
||||
radioModel?.state = isSelected
|
||||
updateAccessibilityLabel()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public var enabledColor: UIColor = .mvmBlack
|
||||
public var disabledColor: UIColor = .mvmCoolGray3
|
||||
public var delegateObject: MVMCoreUIDelegateObject?
|
||||
@ -40,12 +40,12 @@ import UIKit
|
||||
}()
|
||||
|
||||
lazy public var radioButtonSelectionHelper: RadioButtonSelectionHelper? = {
|
||||
if let radioGroupName = radioGroupName,
|
||||
let radioButtonModel = delegateObject?.formHolderDelegate?.formValidator?.radioButtonsModelByGroup[radioGroupName] {
|
||||
return radioButtonModel
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard let radioGroupName = radioGroupName,
|
||||
let radioButtonModel = delegateObject?.formHolderDelegate?.formValidator?.radioButtonsModelByGroup[radioGroupName]
|
||||
else { return nil }
|
||||
|
||||
return radioButtonModel
|
||||
}()
|
||||
|
||||
public override var isEnabled: Bool {
|
||||
@ -128,7 +128,7 @@ import UIKit
|
||||
// Attention: This needs to be addressed with the accessibility team.
|
||||
// NOTE: Currently emptying description part of MVMCoreUICheckBox accessibility label to avoid crashing!
|
||||
if let state = MVMCoreUIUtility.hardcodedString(withKey: isSelected ? "radio_selected_state" : "radio_not_selected_state") {
|
||||
accessibilityLabel = String(format: MVMCoreUIUtility.hardcodedString(withKey: "radio_desc_state") ?? "%@%@", "", state)
|
||||
accessibilityLabel = String(format: MVMCoreUIUtility.hardcodedString(withKey: "radio_desc_state") ?? "%@%@", "", isSelected)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user