Slides from talk at iOSDevUK 2014.
-Accessibility and disabilities
-Assistive technologies on iOS
-Implementing accessibility support
-Testing accessibility
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Â
Beyond VoiceOver: making iOS apps accessible
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
107. Work with a charity
to run a hackathon or
hack day
Wednesday, 3 September 14
108. As a developer,
itâs up to you to
make your app
accessible.
Wednesday, 3 September 14
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. 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