Beyond VoiceOver: making iOS apps accessible

  • Published on
    28-Nov-2014

  • View
    1.138

  • Download
    4

DESCRIPTION

Slides from talk at iOSDevUK 2014. -Accessibility and disabilities -Assistive technologies on iOS -Implementing accessibility support -Testing accessibility

Transcript

<ul><li> 1. Beyond VoiceOver making iOS apps accessible Sally Shepard // @mostgood Wednesday, 3 September 14 </li> <li> 2. What Im going to cover Disability &amp; Accessibility Accessibility on iOS Adding support Testing Wednesday, 3 September 14 </li> <li> 3. Why your app isnt accessible... Wednesday, 3 September 14 </li> <li> 4. Myths Its 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 </li> <li> 5. What do I mean by accessible? Wednesday, 3 September 14 </li> <li> 6. Wednesday, 3 September 14 </li> <li> 7. Wednesday, 3 September 14 </li> <li> 8. Disability Wednesday, 3 September 14 </li> <li> 9. More than 1 billion people live with some form of disability Wednesday, 3 September 14 </li> <li> 10. Thats 1 in 7 people Wednesday, 3 September 14 </li> <li> 11. Growing population Wednesday, 3 September 14 </li> <li> 12. Disability can make life extremely difficult Wednesday, 3 September 14 </li> <li> 13. We can use technology to overcome challenges Wednesday, 3 September 14 </li> <li> 14. How can we use technologies in iOS to overcome disabilities? Wednesday, 3 September 14 </li> <li> 15. Vision Wednesday, 3 September 14 </li> <li> 16. Wednesday, 3 September 14 </li> <li> 17. How is an iOS device used by someone with limited vision? Wednesday, 3 September 14 </li> <li> 18. VoiceOver Wednesday, 3 September 14 </li> <li> 19. VoiceOver replicates the UI for users who cant see it. Wednesday, 3 September 14 </li> <li> 20. Wednesday, 3 September 14 </li> <li> 21. VoiceOver speaks 36 languages Wednesday, 3 September 14 </li> <li> 22. Available on iOS &amp; OS X Wednesday, 3 September 14 </li> <li> 23. To extend VoiceOver, users can also use braille. Wednesday, 3 September 14 </li> <li> 24. Braille displays Wednesday, 3 September 14 </li> <li> 25. Braille Keyboards Wednesday, 3 September 14 </li> <li> 26. Thats pretty amazing! Wednesday, 3 September 14 </li> <li> 27. Demo Wednesday, 3 September 14 </li> <li> 28. Basics of the Accessibility APIs Wednesday, 3 September 14 </li> <li> 29. isAccessibilityElement sendButton.isAccessibliltyElement = YES; Wednesday, 3 September 14 </li> <li> 30. accessibilityLabel - Label that identifies the accessibility element - UIKit control: uses title - Image-based controls definitely need to specify this! - Dont include the control type Play Wednesday, 3 September 14 </li> <li> 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 </li> <li> 32. accessibilityValue - Used when a element has a dynamic value Wednesday, 3 September 14 </li> <li> 33. accessibilityHint - Describes the outcome of performing an action - Dont 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 </li> <li> 34. accessibilityHint - Describes the outcome of performing an action - Dont make it sound like a command - Start with verb describing result - Keep it brief Note: can be disabled by user Wednesday, 3 September 14 </li> <li> 35. Adding support to a Xib or Storyboard Wednesday, 3 September 14 </li> <li> 36. - Enable accessibility - Fill out Label and Hint - Add traits Wednesday, 3 September 14 </li> <li> 37. Adding support programmatically Wednesday, 3 September 14 </li> <li> 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 </li> <li> 39. This is great if your app is really basic... Wednesday, 3 September 14 </li> <li> 40. ...but apps have moved beyond the basics. Wednesday, 3 September 14 </li> <li> 41. Find out if user has VoiceOver on BOOL isVoiceOverOn = UIAccessiblityIsVoiceOverRunning(): Wednesday, 3 September 14 </li> <li> 42. Moving VoiceOver focus UIAccessibilityPostNotification( UIAccessibilityScreenChangedNotification, self.goButton); Wednesday, 3 September 14 </li> <li> 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 </li> <li> 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 </li> <li> 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 </li> <li> 46. Direct Interaction - (UIAccessibilityTraits)accessibilityTraits { return UIAccessibilityTraitAllowsDirectInteraction; } Wednesday, 3 September 14 </li> <li> 47. Accessibility notifications UIAccessibilityPostNotification(NAME, PARAMETER); (UIAccessibilityPageScrolledNotification, @Top of list) (UIAccessibilityAnnouncementNotification, @New message) (UIAccessbilityLayoutChangedNotification, NSString or UIView) etc... Wednesday, 3 September 14 </li> <li> 48. Magic Tap Two-finger double-tap - (BOOL)accessibilityPerformMagicTap { [self doAwesomeThing]; return YES; } Wednesday, 3 September 14 </li> <li> 49. Getting back two-finger, scrub back and forth - (BOOL)accessibilityPerformEscape { // Dismiss your view return YES; } Wednesday, 3 September 14 </li> <li> 50. Not using UIKit? Wednesday, 3 September 14 </li> <li> 51. Its still possible! Wednesday, 3 September 14 </li> <li> 52. Implement UIAccessibilityContainer protocol CustomContentAccessibility sample code from WWDC 2013 Wednesday, 3 September 14 </li> <li> 53. Testing VoiceOver Wednesday, 3 September 14 </li> <li> 54. Have a plan Wednesday, 3 September 14 </li> <li> 55. Test plans User Stories Use Cases Requirements Wednesday, 3 September 14 </li> <li> 56. The simulator Wednesday, 3 September 14 </li> <li> 57. Accessibility Inspector Wednesday, 3 September 14 </li> <li> 58. On a device Wednesday, 3 September 14 </li>...</ul>

Recommended

View more >