beyond voiceover: making ios apps accessible

Post on 28-Nov-2014

1.154 Views

Category:

Technology

4 Downloads

Preview:

Click to see full reader

DESCRIPTION

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

TRANSCRIPT

Beyond VoiceOvermaking iOS apps accessible

Sally Shepard // @mostgood

Wednesday, 3 September 14

What I’m going to cover

★ Disability & Accessibility★ Accessibility on iOS★ Adding support★ Testing

Wednesday, 3 September 14

Why your app isn’t accessible...

Wednesday, 3 September 14

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

What do I mean by ‘accessible’?

Wednesday, 3 September 14

Wednesday, 3 September 14

Wednesday, 3 September 14

Disability

Wednesday, 3 September 14

More than 1 billion people live with some

form of disability

Wednesday, 3 September 14

That’s 1 in 7 people

Wednesday, 3 September 14

Growing population

Wednesday, 3 September 14

Disability can make life extremely difficult

Wednesday, 3 September 14

We can use technology to overcome challenges

Wednesday, 3 September 14

How can we use technologies in iOS to overcome disabilities?

Wednesday, 3 September 14

Vision

Wednesday, 3 September 14

Wednesday, 3 September 14

How is an iOS device used by someone

with limited vision?

Wednesday, 3 September 14

VoiceOver

Wednesday, 3 September 14

VoiceOver replicates the UI for users who

can’t see it.

Wednesday, 3 September 14

Wednesday, 3 September 14

VoiceOver speaks 36 languages

Wednesday, 3 September 14

Available on iOS & OS X

Wednesday, 3 September 14

To extend VoiceOver, users can also use braille.

Wednesday, 3 September 14

Braille displaysWednesday, 3 September 14

Braille Keyboards

Wednesday, 3 September 14

That’s pretty amazing!

Wednesday, 3 September 14

Demo

Wednesday, 3 September 14

Basics of the Accessibility APIs

Wednesday, 3 September 14

isAccessibilityElement

sendButton.isAccessibliltyElement = YES;

Wednesday, 3 September 14

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

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

accessibilityValue - Used when a element has a dynamic value

Wednesday, 3 September 14

accessibilityHint

- Describes the outcome of performing an action- Don’t make it sound like a command- Start with verb describing result- Keep it briefNote: can be disabled by user

“Plays the song”

Wednesday, 3 September 14

accessibilityHint

- Describes the outcome of performing an action- Don’t make it sound like a command- Start with verb describing result- Keep it briefNote: can be disabled by user

Wednesday, 3 September 14

Adding support to a Xib or Storyboard

Wednesday, 3 September 14

- Enable accessibility- Fill out Label and Hint- Add traits

Wednesday, 3 September 14

Adding support programmatically

Wednesday, 3 September 14

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

This is great if your app is really basic...

Wednesday, 3 September 14

...but apps have moved beyond the

basics.

Wednesday, 3 September 14

Find out if user has VoiceOver on

BOOL isVoiceOverOn = UIAccessiblityIsVoiceOverRunning():

Wednesday, 3 September 14

Moving VoiceOver focus

UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, self.goButton);

Wednesday, 3 September 14

UIAccessibilityCustomAction

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];

You can add multiple actions to an element.

Wednesday, 3 September 14

UIAccessibilityContainer

@property (nonatomic, strong) NSArray *accessibilityElements;

Specify the order VoiceOver should go through the elements.

self.accessibilityElements = @[self.imageView, self.headlineLabel, self.summaryLabel, self.twitterButton, self.facebookButton, self.emailButton];

Wednesday, 3 September 14

- (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

Direct Interaction

- (UIAccessibilityTraits)accessibilityTraits { return UIAccessibilityTraitAllowsDirectInteraction;}

Wednesday, 3 September 14

Accessibility notifications

UIAccessibilityPostNotification(NAME, PARAMETER);

(UIAccessibilityPageScrolledNotification, @”Top of list”)(UIAccessibilityAnnouncementNotification, @”New message”)(UIAccessbilityLayoutChangedNotification, NSString or UIView)etc...

Wednesday, 3 September 14

Magic TapTwo-finger double-tap

- (BOOL)accessibilityPerformMagicTap {[self doAwesomeThing];

return YES;}

Wednesday, 3 September 14

Getting backtwo-finger, scrub back and forth

- (BOOL)accessibilityPerformEscape {// Dismiss your viewreturn YES;

}

Wednesday, 3 September 14

Not using UIKit?

Wednesday, 3 September 14

It’s still possible!

Wednesday, 3 September 14

Implement UIAccessibilityContainer

protocol

CustomContentAccessibility sample code from WWDC 2013

Wednesday, 3 September 14

Testing VoiceOver

Wednesday, 3 September 14

Have a plan

Wednesday, 3 September 14

Test plansUser StoriesUse Cases

Requirements

Wednesday, 3 September 14

The simulator

Wednesday, 3 September 14

Accessibility Inspector

Wednesday, 3 September 14

On a device

Wednesday, 3 September 14

Accessibility shortcutTriple-tap the home button

Wednesday, 3 September 14

Siri - turn VoiceOver on

Wednesday, 3 September 14

Screen curtainThree-finger triple-tap on the screen

Wednesday, 3 September 14

User testing

- @AppleVis (http://www.applevis.com)- WWDC labs- Charities and local councils- Support groups

Wednesday, 3 September 14

Physical / Motor skills

Wednesday, 3 September 14

Wednesday, 3 September 14

How does a person with limited physical/motor skills use iOS?

Wednesday, 3 September 14

Assistive Touch

Wednesday, 3 September 14

Switch Control

Wednesday, 3 September 14

Wednesday, 3 September 14

Setting up Switch Control

Wednesday, 3 September 14

Wednesday, 3 September 14

Adding support

Wednesday, 3 September 14

Switch Control finds elements that have

actionable behaviour.

Wednesday, 3 September 14

Basically, if you’ve added support through

UIAccessibility APIs then it should work.

Wednesday, 3 September 14

Testing Switch Control

Wednesday, 3 September 14

On a device

Wednesday, 3 September 14

User testing

Wednesday, 3 September 14

Learning Difficulties

Wednesday, 3 September 14

How does someone with learning

difficulties use an iOS device?

Wednesday, 3 September 14

Guided Access

Wednesday, 3 September 14

How does Guided Access work?

Wednesday, 3 September 14

Adding support

UIGuidedAccessRestrictionDelegate

Wednesday, 3 September 14

New in iOS 8

Wednesday, 3 September 14

Visual Accommodations

BOOL UIAccessibilityIsBoldTextEnabled();

BOOL UIAccessibilityIsReduceTransparencyEnabled();

BOOL UIAccessibilityDarkerSystemColorsEnabled();

BOOL UIAccessibilityIsReduceMotionEnabled();

Wednesday, 3 September 14

Why should you add accessibility

support?

Wednesday, 3 September 14

Wednesday, 3 September 14

"When we work on making our devices

accessible by the blind, I don't consider the

bloody ROI." - Tim Cook

Wednesday, 3 September 14

More users.

Wednesday, 3 September 14

Accessibility is for everyone.

Wednesday, 3 September 14

Craftsmanship.

Wednesday, 3 September 14

It’s it the most amazing thing

you can do as a developer.

Wednesday, 3 September 14

How many apps are accessible?

Wednesday, 3 September 14

This slide intentionally left

blank

Wednesday, 3 September 14

How can we improve this?

Wednesday, 3 September 14

Think about accessibility from the

start.

Wednesday, 3 September 14

Don’t put accessibility in the backlog.

Wednesday, 3 September 14

If you have some open source code,

add accessibility support.

Wednesday, 3 September 14

If you use some open source code,

add support and do a pull request.

Wednesday, 3 September 14

Talk about it more.

Wednesday, 3 September 14

Get involved with charities / councils /

groups.

Wednesday, 3 September 14

There’s still a lot to do.

Wednesday, 3 September 14

What are some things you can do?

Wednesday, 3 September 14

Spend a whole day with VoiceOver or

Switch Control

Wednesday, 3 September 14

Take one weekend and do something with accessibility

Wednesday, 3 September 14

The Eyewriter

Wednesday, 3 September 14

The Eyewriter

Wednesday, 3 September 14

The Eyewriter

Wednesday, 3 September 14

Work with a charity to run a hackathon or

hack day

Wednesday, 3 September 14

As a developer, it’s up to you to make your app

accessible.Wednesday, 3 September 14

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

ResourcesTessting 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

Thank you!

Sally Shepard // @mostgood

Wednesday, 3 September 14

top related