Slides from talk at iOSDevUK 2014.
-Accessibility and disabilities
-Assistive technologies on iOS
-Implementing accessibility support
-Testing accessibility
1. Beyond VoiceOver
making iOS apps accessible
Sally Shepard // @mostgood
Wednesday, 3 September 14
2. What I’m going to cover
★ Disability & Accessibility
★ Accessibility on iOS
★ Adding support
★ Testing
Wednesday, 3 September 14
3. Why your app isn’t
accessible...
Wednesday, 3 September 14
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. What do I mean by
‘accessible’?
Wednesday, 3 September 14
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. 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
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. 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
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. 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. - (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. Direct Interaction
- (UIAccessibilityTraits)accessibilityTraits
{
return UIAccessibilityTraitAllowsDirectInteraction;
}
Wednesday, 3 September 14
47. Accessibility notifications
UIAccessibilityPostNotification(NAME, PARAMETER);
(UIAccessibilityPageScrolledNotification, @”Top of list”)
(UIAccessibilityAnnouncementNotification, @”New message”)
(UIAccessbilityLayoutChangedNotification, NSString or UIView)
etc...
Wednesday, 3 September 14
48. Magic Tap
Two-finger double-tap
- (BOOL)accessibilityPerformMagicTap
{
[self doAwesomeThing];
return YES;
}
Wednesday, 3 September 14
49. Getting back
two-finger, scrub back and forth
- (BOOL)accessibilityPerformEscape
{
// Dismiss your view
return YES;
}
Wednesday, 3 September 14