ONEAPP-4828 - Accessibility - Toggle (State)
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
196bc52288
commit
2f3759ae90
@ -60,7 +60,6 @@ open class Toggle: Control, Changeable, FormFieldable {
|
||||
//--------------------------------------------------
|
||||
private let toggleContainerSize = CGSize(width: 52, height: 44)
|
||||
private let spacingBetween = VDSLayout.Spacing.space3X.value
|
||||
private let labelMaxWidth = 40.0
|
||||
|
||||
/// TextStyle used to render the label.
|
||||
private var textStyle: TextStyle {
|
||||
@ -188,8 +187,6 @@ open class Toggle: Control, Changeable, FormFieldable {
|
||||
addSubview(label)
|
||||
addSubview(toggleView)
|
||||
|
||||
label.widthLessThanEqualTo(labelMaxWidth)
|
||||
|
||||
// Set up initial constraints for label and switch
|
||||
toggleView.centerYAnchor.constraint(equalTo: centerYAnchor).isActive = true
|
||||
|
||||
@ -247,11 +244,10 @@ open class Toggle: Control, Changeable, FormFieldable {
|
||||
/// Used to update any Accessibility properties.
|
||||
open override func updateAccessibility() {
|
||||
super.updateAccessibility()
|
||||
|
||||
if showText {
|
||||
setAccessibilityLabel(for: [label])
|
||||
accessibilityValue = isSelected ? onText : offText
|
||||
} else {
|
||||
accessibilityLabel = "Toggle"
|
||||
accessibilityValue = isSelected ? "On" : "Off"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
1.0.47
|
||||
=======
|
||||
- ONEAPP-4684 - Acessibility - Tooltip (Header)
|
||||
- ONEAPP-4828 - Accessibility - Toggle (State)
|
||||
|
||||
1.0.46
|
||||
=======
|
||||
|
||||
Loading…
Reference in New Issue
Block a user