We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f195fb commit 46b7627Copy full SHA for 46b7627
Sources/AccessibilitySnapshot/Core/Swift/Classes/UIAccessibility+SnapshotAdditions.swift
@@ -108,9 +108,10 @@ extension NSObject {
108
109
if accessibilityTraits.contains(.switchButton) {
110
if let `self` = self as? UISwitch {
111
- if self.isOn {
+ // TODO: Do these need to be localized by script? What about other integers? What about non-integer accessibility values?
112
+ if accessibilityValue == "1" {
113
traitSpecifiers.append(strings.switchButtonOnTraitName)
- } else {
114
+ } else if accessibilityValue == "0" {
115
traitSpecifiers.append(strings.switchButtonOffTraitName)
116
}
117
0 commit comments