screen. • Allows to use external input accessories. • Allows to control the iPhone with head movements. • Introduced on iOS 7. • Not as intrusive as voice over.
system will try to • UIButton • Title / image file name • UILabel / UITextField / UITextView • The content • UIImage (if active) • File Name • UIProgressView / UISlider • Percentage
for a view of your own, we need your help for the win This isn't rocket science in some government facility So take a little time, and implement accessibility James Dempsey The Accessibility Song
drawRect • Non UIView (or SpriteKit) backed UI elements. I.E: CALayer • Interfaces that rely on gestures and not actual “GUI” VoiceOver What about non conventional UI?
open func accessibilityElement(at index: Int) -> Any? open func index(ofAccessibilityElement element: Any) -> Int // A list of container elements managed by the receiver. // This can be used as an alternative to implementing the dynamic methods. // default == nil @available(iOS 8.0, *) open var accessibilityElements: [Any]? // Some containers provide more context for accessibility elements, such as tables // Set this property so that assistive technologies can output more information. // default == UIAccessibilityContainerTypeNone @available(iOS 11.0, *) open var accessibilityContainerType: UIAccessibilityContainerType }
open func accessibilityElement(at index: Int) -> Any? open func index(ofAccessibilityElement element: Any) -> Int // A list of container elements managed by the receiver. // This can be used as an alternative to implementing the dynamic methods. // default == nil @available(iOS 8.0, *) open var accessibilityElements: [Any]? // Some containers provide more context for accessibility elements, such as tables // Set this property so that assistive technologies can output more information. // default == UIAccessibilityContainerTypeNone @available(iOS 11.0, *) open var accessibilityContainerType: UIAccessibilityContainerType }
UIAccessibilityIdentification { // initialize with the accessibility container that contains this element public init(accessibilityContainer container: Any) unowned(unsafe) open var accessibilityContainer: AnyObject? open var isAccessibilityElement: Bool open var accessibilityLabel: String? open var accessibilityHint: String? open var accessibilityValue: String? open var accessibilityFrame: CGRect open var accessibilityTraits: UIAccessibilityTraits // When set, -[UIAccessibilityElement accessibilityFrame] will automatically adjust for the container's frame. // This can be useful when the element is a descendant of a scroll view, for instance. @available(iOS 10.0, *) open var accessibilityFrameInContainerSpace: CGRect }
UIAccessibilityIdentification { // initialize with the accessibility container that contains this element public init(accessibilityContainer container: Any) unowned(unsafe) open var accessibilityContainer: AnyObject? open var isAccessibilityElement: Bool open var accessibilityLabel: String? open var accessibilityHint: String? open var accessibilityValue: String? open var accessibilityFrame: CGRect open var accessibilityTraits: UIAccessibilityTraits // When set, -[UIAccessibilityElement accessibilityFrame] will automatically adjust for the container's frame. // This can be useful when the element is a descendant of a scroll view, for instance. @available(iOS 10.0, *) open var accessibilityFrameInContainerSpace: CGRect }
UIAccessibilityIdentification { // initialize with the accessibility container that contains this element public init(accessibilityContainer container: Any) unowned(unsafe) open var accessibilityContainer: AnyObject? open var isAccessibilityElement: Bool open var accessibilityLabel: String? open var accessibilityHint: String? open var accessibilityValue: String? open var accessibilityFrame: CGRect open var accessibilityTraits: UIAccessibilityTraits // When set, -[UIAccessibilityElement accessibilityFrame] will automatically adjust for the container's frame. // This can be useful when the element is a descendant of a scroll view, for instance. @available(iOS 10.0, *) open var accessibilityFrameInContainerSpace: CGRect }
String: Text to read out loud • Element: To focus on • UIAccessibilityLayoutChangedNotification: Mild change • String: Text to read out loud • Element: To focus on • UIAccessibilityAnnouncementNotification: • String: Text to read out loud public func UIAccessibilityPostNotification(_ notification: UIAccessibilityNotifications, _ argument: Any?)
not enough with it “looking like” the native element it also has to behave like one. • Don’t relay just on overlays to block interactivity • Don’t use “transparent” buttons. (<iOS 11) • Pay attention when using UIGestureRecognizers • Watch out for the name of the assets that we use in the app. • When in doubt, look at for “inspiration” ;)
They get the lay of the land through this alternate means If you want to build your app for maximum utility Then take a little time, implement accessibility James Dempsey The Accessibility Song
They get the lay of the land through this alternate means If you want to build your app for maximum utility Then take a little time, implement accessibility James Dempsey The Accessibility Song It takes