Accessibility value in iOS switches
Accessibility value in iOS switches
- Subject: Accessibility value in iOS switches
- From: Ilya Konstantinov <email@hidden>
- Date: Sat, 26 Aug 2017 18:13:38 +0000
Hi,
I've implemented a switch (like UISwitch) on top of UIControl:
class MyControl: UIControl {
public var value: Bool = false
override func accessibilityActivate() -> Bool {
self.value = !self.value
self.accessibilityValue = self.value ? "yes" : "no"
return true
}
}
UISwitch reads "Accessibility label, on" (and then hint: "Double tap to
goggle") or "Accessibility, off". When toggling the switch, it simply
announces the value "on" or "off" without the accessibility label prefix.
In my control, however, it always reads the accessibility label first (e.g.
"Accessibility label, yes"). How can I emulate the UISwitch behavior?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden