CXTDT-549901 - RadioBox strike through state
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
4935db72d6
commit
42a469aec9
@ -49,6 +49,8 @@ open class RadioBoxGroup: SelectorGroupBase<RadioBoxItem>, SelectorGroupSingleSe
|
||||
$0.isEnabled = !model.disabled
|
||||
$0.inputId = model.inputId
|
||||
$0.isSelected = model.selected
|
||||
$0.strikethrough = model.strikethrough
|
||||
$0.strikethroughAccessibilityText = model.strikethroughAccessibileText
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -115,12 +117,14 @@ extension RadioBoxGroup {
|
||||
/// Array of LabelAttributeModel objects used in rendering the subTextRight.
|
||||
public var subTextRightAttributes: [any LabelAttributeModel]?
|
||||
public var selected: Bool
|
||||
public var strikethrough: Bool = false
|
||||
public var strikethroughAccessibileText: String
|
||||
|
||||
public init(disabled: Bool, surface: Surface = .light, inputId: String? = nil, value: AnyHashable? = nil,
|
||||
text: String = "", textAttributes: [any LabelAttributeModel]? = nil,
|
||||
subText: String? = nil, subTextAttributes: [any LabelAttributeModel]? = nil,
|
||||
subTextRight: String? = nil, subTextRightAttributes: [any LabelAttributeModel]? = nil,
|
||||
selected: Bool = false, errorText: String? = nil, accessibileText: String? = nil) {
|
||||
selected: Bool = false, errorText: String? = nil, accessibileText: String? = nil, strikethrough: Bool = false, strikethroughAccessibileText: String = "not available") {
|
||||
self.disabled = disabled
|
||||
self.surface = surface
|
||||
self.inputId = inputId
|
||||
@ -133,6 +137,8 @@ extension RadioBoxGroup {
|
||||
self.subTextRightAttributes = subTextRightAttributes
|
||||
self.selected = selected
|
||||
self.accessibileText = accessibileText
|
||||
self.strikethrough = strikethrough
|
||||
self.strikethroughAccessibileText = strikethroughAccessibileText
|
||||
}
|
||||
|
||||
public init() {
|
||||
|
||||
@ -123,6 +123,8 @@ open class RadioBoxItem: Control, Changeable, FormFieldable {
|
||||
/// If provided, the radio box will be rendered to show the option with a strikethrough.
|
||||
open var strikethrough: Bool = false { didSet { setNeedsUpdate() } }
|
||||
|
||||
open var strikethroughAccessibilityText: String = "not available" { didSet { setNeedsUpdate() } }
|
||||
|
||||
open var inputId: String? { didSet { setNeedsUpdate() } }
|
||||
|
||||
open var value: AnyHashable? { didSet { setNeedsUpdate() } }
|
||||
@ -236,9 +238,8 @@ open class RadioBoxItem: Control, Changeable, FormFieldable {
|
||||
/// Used to update any Accessibility properties.
|
||||
open override func updateAccessibility() {
|
||||
super.updateAccessibility()
|
||||
if accessibilityLabel == nil {
|
||||
setAccessibilityLabel(for: [textLabel, subTextLabel, subTextRightLabel])
|
||||
}
|
||||
setAccessibilityLabel(for: [textLabel, subTextLabel, subTextRightLabel])
|
||||
accessibilityValue = strikethrough ? strikethroughAccessibilityText : nil
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
- CXTDT-547200 - Carousel scrollbar – Accessibility - The scrollbar is receiving right/ left swipe focus
|
||||
- CXTDT-549888 - Pagination - Accessibility - Next/Previous
|
||||
- CXTDT-542333 - RadioBox Padding
|
||||
- CXTDT-549901 - RadioBox strike through state
|
||||
|
||||
1.0.59
|
||||
----------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user