Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Beyond VoiceOver: making iOS apps accessible

3,788 views

Published on

Slides from talk at iOSDevUK 2014.

-Accessibility and disabilities
-Assistive technologies on iOS
-Implementing accessibility support
-Testing accessibility

Published in: Technology
  • Be the first to comment

Beyond VoiceOver: making iOS apps accessible

  1. 1. Beyond VoiceOver making iOS apps accessible Sally Shepard // @mostgood Wednesday, 3 September 14
  2. 2. What I’m going to cover ★ Disability & Accessibility ★ Accessibility on iOS ★ Adding support ★ Testing Wednesday, 3 September 14
  3. 3. Why your app isn’t accessible... Wednesday, 3 September 14
  4. 4. Myths • “It’s not that many people” • “It's time consuming” • “My app is too complicated to be accessible” • “I don't know how to test it” Wednesday, 3 September 14
  5. 5. What do I mean by ‘accessible’? Wednesday, 3 September 14
  6. 6. Wednesday, 3 September 14
  7. 7. Wednesday, 3 September 14
  8. 8. Disability Wednesday, 3 September 14
  9. 9. More than 1 billion people live with some form of disability Wednesday, 3 September 14
  10. 10. That’s 1 in 7 people Wednesday, 3 September 14
  11. 11. Growing population Wednesday, 3 September 14
  12. 12. Disability can make life extremely difficult Wednesday, 3 September 14
  13. 13. We can use technology to overcome challenges Wednesday, 3 September 14
  14. 14. How can we use technologies in iOS to overcome disabilities? Wednesday, 3 September 14
  15. 15. Vision Wednesday, 3 September 14
  16. 16. Wednesday, 3 September 14
  17. 17. How is an iOS device used by someone with limited vision? Wednesday, 3 September 14
  18. 18. VoiceOver Wednesday, 3 September 14
  19. 19. VoiceOver replicates the UI for users who can’t see it. Wednesday, 3 September 14
  20. 20. Wednesday, 3 September 14
  21. 21. VoiceOver speaks 36 languages Wednesday, 3 September 14
  22. 22. Available on iOS & OS X Wednesday, 3 September 14
  23. 23. To extend VoiceOver, users can also use braille. Wednesday, 3 September 14
  24. 24. Braille displays Wednesday, 3 September 14
  25. 25. Braille Keyboards Wednesday, 3 September 14
  26. 26. That’s pretty amazing! Wednesday, 3 September 14
  27. 27. Demo Wednesday, 3 September 14
  28. 28. Basics of the Accessibility APIs Wednesday, 3 September 14
  29. 29. isAccessibilityElement sendButton.isAccessibliltyElement = YES; Wednesday, 3 September 14
  30. 30. accessibilityLabel - Label that identifies the accessibility element - UIKit control: uses title - Image-based controls definitely need to specify this! - Don’t include the control type “Play” Wednesday, 3 September 14
  31. 31. accessibilityTraits - Combination of traits that best characterise the accessibility element - UIKit controls: defaults to standard traits - Combine traits with an OR operator - (UIAccessibilityTraits)accessibilityTraits { return [super accessibilityTraits] | UIAccessibilityTraitButton; } Wednesday, 3 September 14
  32. 32. accessibilityValue - Used when a element has a dynamic value Wednesday, 3 September 14
  33. 33. accessibilityHint - Describes the outcome of performing an action - Don’t make it sound like a command - Start with verb describing result - Keep it brief Note: can be disabled by user “Plays the song” Wednesday, 3 September 14
  34. 34. accessibilityHint - Describes the outcome of performing an action - Don’t make it sound like a command - Start with verb describing result - Keep it brief Note: can be disabled by user Wednesday, 3 September 14
  35. 35. Adding support to a Xib or Storyboard Wednesday, 3 September 14
  36. 36. - Enable accessibility - Fill out Label and Hint - Add traits Wednesday, 3 September 14
  37. 37. Adding support programmatically Wednesday, 3 September 14
  38. 38. Simple example of adding support UIButton *sendButton = [UIButton buttonWithStyle...]; [sendButton setAccessibilityLabel:@”Send”]; [sendButton setAccessibilityHint:@”Sends message”]; UISwitch *visibleSwitch = [UISwitch new]; NSString *switchValue = [visibleSwitch isOn]?@”Visible”:@”Invisible”; [visibleSwitch setAccessibilityValue:switchValue]; MyCustomControl *myControl = [MyCustomControl new]; [myControl setAccessibilityTraits:[super accessibilityTraits] | UIAccessbilityTraitButton]; //Bitwise OR traits together Wednesday, 3 September 14
  39. 39. This is great if your app is really basic... Wednesday, 3 September 14
  40. 40. ...but apps have moved beyond the basics. Wednesday, 3 September 14
  41. 41. Find out if user has VoiceOver on BOOL isVoiceOverOn = UIAccessiblityIsVoiceOverRunning(): Wednesday, 3 September 14
  42. 42. Moving VoiceOver focus UIAccessibilityPostNotification( UIAccessibilityScreenChangedNotification, self.goButton); Wednesday, 3 September 14
  43. 43. UIAccessibilityCustomAction You can add multiple actions to an element. UIAccessibilityCustomAction *trashAction = [[UIAccessibilityCustomAction alloc] initWithName:@"Trash" target:self selector:@selector(trashMessage)]; UIAccessibilityCustomAction *moreAction = [[UIAccessibilityCustomAction alloc] initWithName:@"More" target:self selector:@selector(moreOptions)]; UIAccessibilityCustomAction *activateAction = [[UIAccessibilityCustomAction alloc] initWithName:@"Activate" target:self selector:@selector(activate)]; cell.accessibilityCustomActions = @[trashAction, moreAction, activateAction]; Wednesday, 3 September 14
  44. 44. UIAccessibilityContainer Specify the order VoiceOver should go through the elements. @property (nonatomic, strong) NSArray *accessibilityElements; self.accessibilityElements = @[self.imageView, self.headlineLabel, self.summaryLabel, self.twitterButton, self.facebookButton, self.emailButton]; Wednesday, 3 September 14
  45. 45. - (BOOL)accessibilityActivate; -This gets called when a user double-taps. -Good for elements where a gesture is used to normally activate it. Return YES or NO depending on success. Wednesday, 3 September 14
  46. 46. Direct Interaction - (UIAccessibilityTraits)accessibilityTraits { return UIAccessibilityTraitAllowsDirectInteraction; } Wednesday, 3 September 14
  47. 47. Accessibility notifications UIAccessibilityPostNotification(NAME, PARAMETER); (UIAccessibilityPageScrolledNotification, @”Top of list”) (UIAccessibilityAnnouncementNotification, @”New message”) (UIAccessbilityLayoutChangedNotification, NSString or UIView) etc... Wednesday, 3 September 14
  48. 48. Magic Tap Two-finger double-tap - (BOOL)accessibilityPerformMagicTap { [self doAwesomeThing]; return YES; } Wednesday, 3 September 14
  49. 49. Getting back two-finger, scrub back and forth - (BOOL)accessibilityPerformEscape { // Dismiss your view return YES; } Wednesday, 3 September 14
  50. 50. Not using UIKit? Wednesday, 3 September 14
  51. 51. It’s still possible! Wednesday, 3 September 14
  52. 52. Implement UIAccessibilityContainer protocol CustomContentAccessibility sample code from WWDC 2013 Wednesday, 3 September 14
  53. 53. Testing VoiceOver Wednesday, 3 September 14
  54. 54. Have a plan Wednesday, 3 September 14
  55. 55. Test plans User Stories Use Cases Requirements Wednesday, 3 September 14
  56. 56. The simulator Wednesday, 3 September 14
  57. 57. Accessibility Inspector Wednesday, 3 September 14
  58. 58. On a device Wednesday, 3 September 14
  59. 59. Accessibility shortcut Triple-tap the home button Wednesday, 3 September 14
  60. 60. Siri - turn VoiceOver on Wednesday, 3 September 14
  61. 61. Screen curtain Three-finger triple-tap on the screen Wednesday, 3 September 14
  62. 62. User testing - @AppleVis (http://www.applevis.com) - WWDC labs - Charities and local councils - Support groups Wednesday, 3 September 14
  63. 63. Physical / Motor skills Wednesday, 3 September 14
  64. 64. Wednesday, 3 September 14
  65. 65. How does a person with limited physical/ motor skills use iOS? Wednesday, 3 September 14
  66. 66. Assistive Touch Wednesday, 3 September 14
  67. 67. Switch Control Wednesday, 3 September 14
  68. 68. Wednesday, 3 September 14
  69. 69. Setting up Switch Control Wednesday, 3 September 14
  70. 70. Wednesday, 3 September 14
  71. 71. Adding support Wednesday, 3 September 14
  72. 72. Switch Control finds elements that have actionable behaviour. Wednesday, 3 September 14
  73. 73. Basically, if you’ve added support through UIAccessibility APIs then it should work. Wednesday, 3 September 14
  74. 74. Testing Switch Control Wednesday, 3 September 14
  75. 75. On a device Wednesday, 3 September 14
  76. 76. User testing Wednesday, 3 September 14
  77. 77. Learning Difficulties Wednesday, 3 September 14
  78. 78. How does someone with learning difficulties use an iOS device? Wednesday, 3 September 14
  79. 79. Guided Access Wednesday, 3 September 14
  80. 80. How does Guided Access work? Wednesday, 3 September 14
  81. 81. Adding support UIGuidedAccessRestrictionDelegate Wednesday, 3 September 14
  82. 82. New in iOS 8 Wednesday, 3 September 14
  83. 83. Visual Accommodations BOOL UIAccessibilityIsBoldTextEnabled(); BOOL UIAccessibilityIsReduceTransparencyEnabled(); BOOL UIAccessibilityDarkerSystemColorsEnabled(); BOOL UIAccessibilityIsReduceMotionEnabled(); Wednesday, 3 September 14
  84. 84. Why should you add accessibility support? Wednesday, 3 September 14
  85. 85. Wednesday, 3 September 14
  86. 86. "When we work on making our devices accessible by the blind, I don't consider the bloody ROI." - Tim Cook Wednesday, 3 September 14
  87. 87. More users. Wednesday, 3 September 14
  88. 88. Accessibility is for everyone. Wednesday, 3 September 14
  89. 89. Craftsmanship. Wednesday, 3 September 14
  90. 90. It’s it the most amazing thing you can do as a developer. Wednesday, 3 September 14
  91. 91. How many apps are accessible? Wednesday, 3 September 14
  92. 92. This slide intentionally left blank Wednesday, 3 September 14
  93. 93. How can we improve this? Wednesday, 3 September 14
  94. 94. Think about accessibility from the start. Wednesday, 3 September 14
  95. 95. Don’t put accessibility in the backlog. Wednesday, 3 September 14
  96. 96. If you have some open source code, add accessibility support. Wednesday, 3 September 14
  97. 97. If you use some open source code, add support and do a pull request. Wednesday, 3 September 14
  98. 98. Talk about it more. Wednesday, 3 September 14
  99. 99. Get involved with charities / councils / groups. Wednesday, 3 September 14
  100. 100. There’s still a lot to do. Wednesday, 3 September 14
  101. 101. What are some things you can do? Wednesday, 3 September 14
  102. 102. Spend a whole day with VoiceOver or Switch Control Wednesday, 3 September 14
  103. 103. Take one weekend and do something with accessibility Wednesday, 3 September 14
  104. 104. The Eyewriter Wednesday, 3 September 14
  105. 105. The Eyewriter Wednesday, 3 September 14
  106. 106. The Eyewriter Wednesday, 3 September 14
  107. 107. Work with a charity to run a hackathon or hack day Wednesday, 3 September 14
  108. 108. As a developer, it’s up to you to make your app accessible. Wednesday, 3 September 14
  109. 109. Facts ✓ It’s a lot of people ✓ It's simple ✓ No app is too complicated to be accessible ✓ Testing is straightforward Wednesday, 3 September 14
  110. 110. Resources Tessting Accessibility on iOS: developer.apple.com/library/ios/technotes/ TestingAccessibilityOfiOSApps Sample code for non-UIKit: developer.apple.com/library/ios/samplecode/ sc2216 Accessibility programming guide for iOS: developer.apple.com/library/ios/documentation/ UserExperience/Conceptual/iPhoneAccessibility Impairment Simulator Software: www.inclusivedesigntoolkit.com Wednesday, 3 September 14
  111. 111. Thank you! Sally Shepard // @mostgood Wednesday, 3 September 14

×