Funka Accessibility Days: Mobile Accessibility - A Technical Perspective and iOS Case Study
A technical look at mobile accessibility: What is mobile accessibility? What technologies do we care about? How does one specific set of mobile accessibility APIs work, that being iOS? What are some mobile specific design concerns?
1. Use system-sized fonts 2. Tell your text fields, labels etc. to respect system-sized fonts dynamically 3. Use AutoLayout to make sure that anything housing text can grow
• WWDC 2017 - Apple - Auto Layout Techniques in Interface Builder • UIKonf 2017 - Mischa Hildebrand - Auto Layout: From Trailing to Leading • GOTO 2015 - Sam Davies - Adaptive UI
Tells us what the object is. • Strings will be their own labels, but… • Image based controls need this set manually • Don’t include the type of object or control this is (i.e. “button”) • Good labels: “Mail” “Send” “New Tweet” • Bad labels: “Mail icon” “Send button” “Tap this to tweet”
Less frequently used • Useful when an item has a dynamic value • If focus doesn’t move but value changes, only value is read • Don’t repeat the label! • Good values: “One new item” “50 percent” • Bad labels: “One new mail item” “50 percent of the slider”
Describes outcome of activation, i.e. double-tap • May also describe other possible actions • Should start with verb and be concise • Good values: “Sends message” “Double-tap and hold to delete” • Bad labels: “You can send the message” “Delete”
Not strings! iOS will handle the correct strings • Describe characteristics of the object • Link, button, adjustable, image, etc. • UIKit objects have default traits, but you may need to add more • Should use bitwise-or to combine traits
• Set isAccessibilityElement on self to false • All custom UIAccessibilityElement objects must have • label • frame • Set accessibilityElements array when: • Not using UIViews (custom drawing) • Controlling VoiceOver reading-order of elements
• UIAccessibilityCustomAction initialized with a localized name, target and action • Set the accessibilityCustomActions on the correct view • Best used when a view has • gestures • many buttons within it
should be localized • Other notification types include: • UIAccessibilityScreenChangedNotification • UIAccessibilityLayoutChangedNotification • UIAccessibilityPageScrolledNotification
Good VoiceOver support ➡ Good Switch Control support • Custom Actions work with Switch Control as well • A few cases for special concern • Stopping the cursor • Modifying how the cursor navigates items