98
Implementing Inclusive Interfaces Sally Shepard // @mostgood

Implementing Inclusive Interfaces

Embed Size (px)

Citation preview

Page 1: Implementing Inclusive Interfaces

Implementing Inclusive

InterfacesSally Shepard // @mostgood

Page 2: Implementing Inclusive Interfaces

Implementing

Inclusive Interfaces

Page 3: Implementing Inclusive Interfaces

accessible |əkˈsɛsɪb(ə)l| adjective able to be reached, entered, or used by people who have a disability.

Page 4: Implementing Inclusive Interfaces

disability?

Page 5: Implementing Inclusive Interfaces

inclusive |ɪnˈkluːsɪv| adjective not excluding any section of society or any party involved in something.

Page 6: Implementing Inclusive Interfaces

Implementing Inclusive

Interfaces

Page 7: Implementing Inclusive Interfaces

interface |ˈɪntəәfeɪs| noun a device or program enabling a user to communicate with a computer.

Page 8: Implementing Inclusive Interfaces

interface != GUI

Page 9: Implementing Inclusive Interfaces

Vision

Page 10: Implementing Inclusive Interfaces

VoiceOver Zoom

Invert Colors Greyscale Larger Text Bold Text

Button Shapes Reduce Transparency

Increase Contrast Reduce Motion On/Off Labels

Page 11: Implementing Inclusive Interfaces

VoiceOver replicates the GUI by speaking it.

Page 12: Implementing Inclusive Interfaces

VoiceOver speaks more than 30 languages

Page 13: Implementing Inclusive Interfaces

Available on iOS, OS X, Apple TV

& Apple Watch

Page 14: Implementing Inclusive Interfaces

To extend VoiceOver, users can also use braille.

Page 15: Implementing Inclusive Interfaces

Braille displays

Page 16: Implementing Inclusive Interfaces

Braille displays

Page 17: Implementing Inclusive Interfaces

Braille Keyboards

Page 18: Implementing Inclusive Interfaces

That’s amazing!

Page 19: Implementing Inclusive Interfaces

Demo: Using VoiceOver

Page 20: Implementing Inclusive Interfaces

Physical / Motor skills

Page 21: Implementing Inclusive Interfaces

Assistive Touch

Page 22: Implementing Inclusive Interfaces

New in iOS 9!

Touch Accommodation Hold Duration Tap Assistance

Page 23: Implementing Inclusive Interfaces

Switch Control

Page 24: Implementing Inclusive Interfaces
Page 25: Implementing Inclusive Interfaces

Demo: Switch Control

Page 26: Implementing Inclusive Interfaces

Learning Difficulties

Page 27: Implementing Inclusive Interfaces

Guided Access

Page 28: Implementing Inclusive Interfaces

How does Guided Access work?

Page 29: Implementing Inclusive Interfaces

Hearing

Page 30: Implementing Inclusive Interfaces

Hearing Aids LED Flash

Mono Audio Noise Cancellation

Audio Balance Subtitles & Captioning

Page 31: Implementing Inclusive Interfaces

Implementing Inclusive

Interfaces

Page 32: Implementing Inclusive Interfaces

Accessibility APIsClasses: UIAccessibilityElement UIAccessibilityCustomAction

Informal Protocols: UIAccessibility UIAccessibilityAction UIAccessibilityContainer UIAccessibilityFocus

Protocols: UIAccessibilityReadingContent UIAccessibilityIdentification

Page 33: Implementing Inclusive Interfaces

Basics of the Accessibility APIs

Page 34: Implementing Inclusive Interfaces

isAccessibilityElement

sendButton.isAccessibliltyElement = YES;

Page 35: Implementing Inclusive Interfaces

VoiceOver: Describe the element

Label: Invert Colours - Off Hint: Double-tap to toggle setting

Label: Vision Trait: Heading

Page 36: Implementing Inclusive Interfaces

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

Page 37: Implementing Inclusive Interfaces

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

Page 38: Implementing Inclusive Interfaces

UIAccessibilityTraitNone; UIAccessibilityTraitButton; UIAccessibilityTraitLink; UIAccessibilityTraitSearchField; UIAccessibilityTraitImage; UIAccessibilityTraitSelected; UIAccessibilityTraitPlaysSound; UIAccessibilityTraitKeyboardKey; UIAccessibilityTraitStaticText; UIAccessibilityTraitSummaryElement; UIAccessibilityTraitNotEnabled; UIAccessibilityTraitUpdatesFrequently; UIAccessibilityTraitStartsMediaSession; UIAccessibilityTraitAdjustable; UIAccessibilityTraitAllowsDirectInteraction; UIAccessibilityTraitCausesPageTurn; UIAccessibilityTraitHeader;

Page 39: Implementing Inclusive Interfaces

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

“Sends the message”

Page 40: Implementing Inclusive Interfaces

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

Page 41: Implementing Inclusive Interfaces

Testing

Page 42: Implementing Inclusive Interfaces

Simulator - Accessibility Inspector

Page 43: Implementing Inclusive Interfaces

Testing VoiceOver on a device

Page 44: Implementing Inclusive Interfaces

Siri - turn VoiceOver on

Page 45: Implementing Inclusive Interfaces

Screen curtainThree-finger triple-tap on the screen

Page 46: Implementing Inclusive Interfaces

Accessibility shortcut

Triple-tap the home button

Page 47: Implementing Inclusive Interfaces

Testing Switch Control on a device

Page 48: Implementing Inclusive Interfaces

Inclusive User Experience

Page 49: Implementing Inclusive Interfaces

Make it functional.

Page 50: Implementing Inclusive Interfaces

Step 1: Make a list of essential user stories / features.

Page 51: Implementing Inclusive Interfaces

Step 2: Test each feature,

recording the results as you go.

Page 52: Implementing Inclusive Interfaces

Step 3: Fix it until it’s functional.

Page 53: Implementing Inclusive Interfaces

Case study:

Gift Finder by notonthehighstreet.com

Page 54: Implementing Inclusive Interfaces

A user can view all details about a product.A user can purchase a product or products through the checkout.A user can browse through the products by pre-defined categories.A user can find a product by searching.A user can select a product from a list of chosen picks.A user can sort a list of products by relevance, price or date added.A user can filter a list of products by price range and various criteria.A user can view a list of products as a list or a grid.A user can add a product to a list of favourites.A user can add a product to the basket.A user can customise a product by personalizing it.

Page 55: Implementing Inclusive Interfaces

A user can view all details about a product.

Page 56: Implementing Inclusive Interfaces

A user can view all details about a

product.

Page 57: Implementing Inclusive Interfaces

A user can view all details about a

product.

Page 58: Implementing Inclusive Interfaces

A user can view all details about a

product.

Page 59: Implementing Inclusive Interfaces

A user can view all details about a

product.

Page 60: Implementing Inclusive Interfaces
Page 61: Implementing Inclusive Interfaces
Page 62: Implementing Inclusive Interfaces

Testing results: Highlight what’s read

out.

Page 63: Implementing Inclusive Interfaces

Testing results: Highlight what’s read

out.

Page 64: Implementing Inclusive Interfaces

Testing results: Highlight what’s read

out.

Page 65: Implementing Inclusive Interfaces

Testing results: Highlight what’s read

out.

Page 66: Implementing Inclusive Interfaces

Testing results: Block out anything

not enabled.

Page 67: Implementing Inclusive Interfaces

Testing results: Block out anything

not enabled.

Page 68: Implementing Inclusive Interfaces

Testing results: Block out anything

not enabled.

Page 69: Implementing Inclusive Interfaces

Testing results: Block out anything

not enabled.

Page 70: Implementing Inclusive Interfaces

Add your testing results to source control.

Page 71: Implementing Inclusive Interfaces

Fix any elements that are not working.

Page 72: Implementing Inclusive Interfaces

- (void)viewDidLoad { ... [self.closeButton setTitle:NSLocalizedString(@“close button title", nil) forState:UIControlStateNormal]; self.closeButton.accessibilityTraits = UIAccessibilityTraitButton; self.imageScrollView.isAccessibilityElement = YES; self.addToFavouritesButton.isAccessibilityElement = YES; [self.addToFavouritesButton setTitle:NSLocalizedString(@“add to favourites button title", nil) forState:UIControlStateNormal]; self.addToFavouritesButton.accessibilityTraits = UIAccessibilityTraitButton; self.addToCartButton.isAccessibilityElement = YES; [self.addToCartButton setTitle:NSLocalizedString(@“add to cart button title", nil) forState:UIControlStateNormal]; self.addToCartButton.accessibilityTraits = UIAccessibilityTraitButton; ... }

In the “product detail class”

Page 73: Implementing Inclusive Interfaces

Fix it until it’s functional.

Page 74: Implementing Inclusive Interfaces

Adding polish

Page 75: Implementing Inclusive Interfaces

- (void)viewDidLoad { ... self.isAccessibilityElement = YES; self.accessibilityLabel = [NSString stringWithFormat:@"%@, %@", self.titleLabel.text, self.priceLabel.text]; self.titleLabel.isAccessibilityElement = NO; self.priceLabel.isAccessibilityElement = NO; ... }

Group elements - In the “product cell class”

Page 76: Implementing Inclusive Interfaces

Find out if user has VoiceOver on

BOOL isVoiceOverOn = UIAccessiblityIsVoiceOverRunning():

Page 77: Implementing Inclusive Interfaces

Moving VoiceOver focus

UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, self.goButton);

Page 78: Implementing Inclusive Interfaces

Direct Interaction

- (UIAccessibilityTraits)accessibilityTraits { return UIAccessibilityTraitAllowsDirectInteraction; }

Page 79: Implementing Inclusive Interfaces

Localization and VoiceOver

- (NSString *)accessibilityLabel { return NSLocalizedString(@"titleLabelText", nil); }

titleLabel.accessibilityLabel = NSLocalizedString(@"titleLabelText", nil);

//OR

Page 80: Implementing Inclusive Interfaces

Accessibility notifications

UIAccessibilityPostNotification(NAME, PARAMETER);

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

Page 81: Implementing Inclusive Interfaces

Find out when VoiceOver is finished speaking

Listen out for: UIAccessibilityAnnouncementDidFinishNotification

To find out if VoiceOver had finished reading or was interrupted, check the userInfo:

UIAccessibilityAnnouncementKeyStringValue UIAccessibilityAnnouncementKeyWasSuccessful

Page 82: Implementing Inclusive Interfaces

Magic TapTwo-finger double-tap

- (BOOL)accessibilityPerformMagicTap { [self doAwesomeThing];

return YES; }

Page 83: Implementing Inclusive Interfaces

Getting backtwo-finger, scrub back and forth

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

Page 84: Implementing Inclusive Interfaces

Modal presentation

@property(nonatomic) BOOL accessibilityViewIsModal

Page 85: Implementing Inclusive Interfaces

Reduce transparency

UIAccessibilityIsReduceTransparencyEnabled()

Reduce motion

UIAccessibilityIsReduceMotionEnabled()

Page 86: Implementing Inclusive Interfaces

Custom ActionsUIAccessibilityCustomAction

UIAccessibilityCustomAction *favouriteAction = [[UIAccessibilityCustomAction alloc] initWithName:@“Add to favourites" target:self selector:@selector(addToFavourites)];

UIAccessibilityCustomAction *addToBasketAction = [[UIAccessibilityCustomAction alloc] initWithName:@“Add to basket" target:self selector:@selector(addToBasket)];

for (UIView *element in cardView.accessibilityElements) { element.accessibilityCustomActions = @[helloAction, goodbyeAction]; }

Page 87: Implementing Inclusive Interfaces

Web Content

https://developer.apple.com/videos/wwdc/2014/?include=516#516

ARIA Support Closed Captions for HTML5 Video HTML5 Timed Text Tracks HTML5 Media Synchronization

Captions for video High DPI for image-set Page visibility events Web Speech API

Page 88: Implementing Inclusive Interfaces

Adding support for Switch Control

UIAccessibilityNotificationSwitchControlIdentifier

New in iOS 8:

Page 89: Implementing Inclusive Interfaces

Pause and Resume SwitchControl:

UIAccessibilityPauseAssistiveTechnologyNotification

UIAccessibilityResumeAssistiveTechnologyNotification

Page 90: Implementing Inclusive Interfaces

Adding Guided Access support

UIGuidedAccessRestrictionDelegate

Page 91: Implementing Inclusive Interfaces

Homework!

Page 92: Implementing Inclusive Interfaces

Spend a whole day with VoiceOver or

Switch Control

#1

Page 93: Implementing Inclusive Interfaces

Don’t make assumptions.

#2

Page 94: Implementing Inclusive Interfaces

Where should you start? Make it functional!

#3

Page 95: Implementing Inclusive Interfaces

Iterate & polish

#4

Page 96: Implementing Inclusive Interfaces

Make it a requirement not a feature.

#5

Page 97: Implementing Inclusive Interfaces

ResourcesTesting 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

WatchOS Accessibility WWDC session: https://developer.apple.com/videos/wwdc/2015/?id=204

Impairment Simulator Software: www.inclusivedesigntoolkit.com

Page 98: Implementing Inclusive Interfaces

Thank you!Sally Shepard // @mostgood