Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

Accessibility is my favorite part of the platform + RobDodson @rob_dodson

Slide 3

Slide 3 text

#GAAD #io16 Happy Global Accessibly Awareness Day! Tweet this!

Slide 4

Slide 4 text

g.co/WebA11yCourse Oh snap! Check this out!!!

Slide 5

Slide 5 text

Taxes. Wheeeeee…

Slide 6

Slide 6 text

(˽°□°)˽Ɨ ˍʓˍ

Slide 7

Slide 7 text

I ❤ Accessibility

Slide 8

Slide 8 text

Why?

Slide 9

Slide 9 text

Greenfield

Slide 10

Slide 10 text

Benefits everyone

Slide 11

Slide 11 text

Certainty

Slide 12

Slide 12 text

Good accessibility is good UX

Slide 13

Slide 13 text

But… is hard…

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Diversity of users Focus Semantics

Slide 16

Slide 16 text

Understanding the diversity of users

Slide 17

Slide 17 text

About 15% of the world's population lives with some form of disability - World Health Organization source • who.int/disabilities/world_report/2011/report

Slide 18

Slide 18 text

1 Billion People

Slide 19

Slide 19 text

visual auditory cognitive motor

Slide 20

Slide 20 text

Visual A broad range from no vision (total blindness) to limited or low vision

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

Motor Users may prefer not to use a mouse, have RSI, or physical paralysis and limited range of motion

Slide 24

Slide 24 text

Motor Users may prefer not to use a mouse, have RSI, or physical paralysis and limited range of motion

Slide 25

Slide 25 text

Auditory May be completely deaf or hard of hearing

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

Cognitive A broad range encompassing ADHD, dyslexia, and autism just to name a few

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

visual auditory cognitive motor

Slide 30

Slide 30 text

WCAG 2.0 Web Content Accessibility Guidelines 2.0 provide a system for assessing the accessibility of any app w3.org/TR/WCAG20

Slide 31

Slide 31 text

WebAIM WCAG 2.0 Checklist webaim.org/standards/wcag/checklist

Slide 32

Slide 32 text

Nail the checklist

Slide 33

Slide 33 text

Focus

Slide 34

Slide 34 text

Focus determines where keyboard events go in the page.

Slide 35

Slide 35 text

Tab Order The order in which DOM elements receive focus as the user presses the tab key

Slide 36

Slide 36 text

DOM Order Matters Tab order is inferred by the order of the DOM. Changing the visual position of elements can lead to an illogical tab order.

Slide 37

Slide 37 text

Be Focused I Should Last! I Should
 Be Focused
 Last! HTML Output

Slide 38

Slide 38 text

Be Focused I Should Last! I Should
 Be Focused
 Last! HTML Output tab

Slide 39

Slide 39 text

Be Focused I Should Last! I Should
 Be Focused
 Last! HTML Output tab

Slide 40

Slide 40 text

Be Focused I Should Last! I Should
 Be Focused
 Last! HTML Output tab

Slide 41

Slide 41 text

I Should 
 Be Focused
 Last! HTML Output I Should Be Focused Last!

Slide 42

Slide 42 text

I Should Be Focused Last! I Should 
 Be Focused
 Last! HTML Output tab

Slide 43

Slide 43 text

I Should Be Focused Last! I Should 
 Be Focused
 Last! HTML Output tab

Slide 44

Slide 44 text

I Should Be Focused Last! I Should 
 Be Focused
 Last! HTML Output tab

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

Don’t fight the platform Leverage the natural DOM order to create a good keyboard experience

Slide 47

Slide 47 text

What can be focused?

Slide 48

Slide 48 text

What can be focused? should

Slide 49

Slide 49 text

Implicitly Focusable Native elements like input, button, and select get focusability for free! Click Me! Password Aisle Seat

Slide 50

Slide 50 text

Not all elements are focusable

Slide 51

Slide 51 text

Bop Beep Boop Beep
 Bop
 Boop HTML Output

Slide 52

Slide 52 text

Beep Boop Beep

Bop

 Boop HTML Output BOP

Slide 53

Slide 53 text

Beep Boop Beep

Bop

 Boop HTML Output BOP tab

Slide 54

Slide 54 text

Beep Boop Beep

Bop

 Boop HTML Output BOP tab

Slide 55

Slide 55 text

Beep Boop Beep
 Bop 
 Boop HTML Output BOP

Slide 56

Slide 56 text

Beep Boop Beep
 Bop 
 Boop HTML Output BOP tab

Slide 57

Slide 57 text

Beep Boop Beep
 Bop 
 Boop HTML Output BOP tab

Slide 58

Slide 58 text

Don’t fight the platform Use native elements whenever possible

Slide 59

Slide 59 text

tabindex Configure the focus behavior of an element

Slide 60

Slide 60 text

tabindex=“0” In the natural tab order and can be programmatically focused by calling focus() Settings
Settings

Slide 61

Slide 61 text

tabindex=“0” In the natural tab order and can be programmatically focused by calling focus() Settings
Settings

Slide 62

Slide 62 text

tabindex=“0” In the natural tab order and can be programmatically focused by calling focus()
Settings
Settings

Slide 63

Slide 63 text

tabindex=“-1” Not in the natural tab order but can be programmatically focused by calling focus(). Useful for “roving tabindex”
Item 1
Item 2
Item 3
Item 1 Item 2 Item 3

Slide 64

Slide 64 text

tabindex=“-1”
Item 1
Item 2
Item 3
Item 1 Item 2 Item 3 focus(); Not in the natural tab order but can be programmatically focused by calling focus(). Useful for “roving tabindex”

Slide 65

Slide 65 text

tabindex=“5” In the natural tab order and jumps ahead of everything else. Generally an anti-pattern.

Slide 66

Slide 66 text

ARIA Design Patterns w3.org/TR/wai-aria-practices-1.1

Slide 67

Slide 67 text

Use the keyboard patterns from the ARIA Authoring guide to ensure an accessible experience

Slide 68

Slide 68 text

Extend the platform Turn useful patterns into Web Components

Slide 69

Slide 69 text

DECLINE ACCEPT Would you like to save? Otherwise all will be deleted!

Slide 70

Slide 70 text

DECLINE ACCEPT Would you like to save? Otherwise all will be deleted! tab

Slide 71

Slide 71 text

DECLINE ACCEPT Would you like to save? Otherwise all will be deleted! tab

Slide 72

Slide 72 text

DECLINE ACCEPT Would you like to save? Otherwise all will be deleted! oh no! tab

Slide 73

Slide 73 text

// Will hold previously focused element var focusedElementBeforeModal; // Find the modal and its overlay var modal = document.querySelector('.modal'); var modalOverlay = document.querySelector('.modal-overlay'); var modalToggle = document.querySelector('.modal-toggle'); modalToggle.addEventListener('click', openModal); Code for trapping modal focus

Slide 74

Slide 74 text

Would you like to save?

Otherwise all will be deleted!

Decline Accept

Slide 75

Slide 75 text

Would you like to save?

Otherwise all will be deleted!

Decline Accept
Trap focus

Slide 76

Slide 76 text

Would you like to save?

Otherwise all will be deleted!

Decline Accept
Move focus into the modal

Slide 77

Slide 77 text

Would you like to save?

Otherwise all will be deleted!

Decline Accept
Dismiss or confirm and close modal

Slide 78

Slide 78 text

Would you like to save?

Otherwise all will be deleted!

Decline Accept
Restore focus

Slide 79

Slide 79 text

No content

Slide 80

Slide 80 text

Semantics

Slide 81

Slide 81 text

Affordances Affordances offer or afford a person the opportunity to perform an action.

Slide 82

Slide 82 text

Programmatic semantics
Search
Preferred seat type No preference Aisle seat Window seat pop-up button value: “No preference” name: “Preferred seat type” state: collapsed

Slide 83

Slide 83 text

Programmatic semantics
Search
Preferred seat type No preference Aisle seat Window seat Role: “pop-up button” Name: “Preferred seat type” State: collapsed Value: “No preference”

Slide 84

Slide 84 text

GUI accessibility tree assistive technology user application

Slide 85

Slide 85 text

Implicit Semantics Similar to focus, native elements get rich semantics for free Click Me! Password Aisle Seat “pop-up button” “button” “secure edit text”

Slide 86

Slide 86 text

Generic elements have generic semantics
Sign Up
SIGN UP “group”

Slide 87

Slide 87 text

Don’t fight the platform Use native elements for free programmatic semantics

Slide 88

Slide 88 text

WAI-ARIA The Web Accessibility Initiative - Accessible Rich Internet Applications (ARIA) specification adds the ability to modify and enhance the semantic meaning of elements in the DOM

Slide 89

Slide 89 text

ARIA does NOT change behavior

Slide 90

Slide 90 text

Sign Up ✔ Sign Up …

Slide 91

Slide 91 text

ARIA. All of it…

Slide 92

Slide 92 text

ARIA Design Patterns

Slide 93

Slide 93 text

No content

Slide 94

Slide 94 text

Sign Up ✔ Sign Up …

Slide 95

Slide 95 text

Sign Up ✔ Sign Up role: checkbox state: unchecked

Slide 96

Slide 96 text

Sign Up ✔ Sign Up role: checkbox state: checked

Slide 97

Slide 97 text

aria-label A string to be used as the accessible label. Overrides any other native labelling mechanism. “button”

Slide 98

Slide 98 text

aria-label A string to be used as the accessible label. Overrides any other native labelling mechanism. “Main Menu, button”

Slide 99

Slide 99 text

aria-labelledby A reference to an element (or elements) which will act as an accessible label. Overrides any other labelling mechanism including aria-label. “Shop Now, button”
Men’s Outerwear
Shop Now

Slide 100

Slide 100 text

aria-labelledby A reference to an element (or elements) which will act as an accessible label. Overrides any other labelling mechanism including aria-label. “Men’s Outerwear, Shop Now, button”
Men’s Outerwear
Shop Now

Slide 101

Slide 101 text

Sign Up ✔ Sign Up role: checkbox state: checked

Slide 102

Slide 102 text

Sign Up ✔ Sign Up role: checkbox name: “Sign Up” state: checked

Slide 103

Slide 103 text

Accessibility Developer Tools

Slide 104

Slide 104 text

No content

Slide 105

Slide 105 text

No content

Slide 106

Slide 106 text

No content

Slide 107

Slide 107 text

github.com/Polymer/shop

Slide 108

Slide 108 text

Review!

Slide 109

Slide 109 text

Nail the checklist Consider the broad range of users. Work with WCAG 2.0 and the Web AIM checklist to ensure your application is accessible.

Slide 110

Slide 110 text

Ensure focus Leverage native elements like button for easy focus wins. Use tabindex to add keyboard support to custom elements.

Slide 111

Slide 111 text

Offer affordances Use native elements with built- in, rich semantics. Refer to ARIA Authoring Practices doc when you need to add your own custom semantics.

Slide 112

Slide 112 text

Good accessibility is good UX

Slide 113

Slide 113 text

g.co/WebA11yCourse

Slide 114

Slide 114 text

Accessibility talks Thu, 5pm - Hercules Google.org: Accelerating innovation for people w/ disabilities Fri, 11am - Ursa Minor Inclusive Design and Testing: Making your app accessible Sandbox Visit Access & Empathy sandbox for demos

Slide 115

Slide 115 text

Thank You! + RobDodson @rob_dodson Images created by Julien Deveaux, Co-Effect Creative, Michael Wohlwend, Maico Amorim, Yu Luck, Andrey Vasiliev, Till Teenck, Gregor Črešnar, Wes Breazell from the Noun project Credits