Making A11y Easy

A presentation at Concatenate in August 2018 in Lagos, Nigeria by Ire Aderinokun

Slide 1

Slide 1

Making A11y Easy ConcatenateConf 2018

Slide 2

Slide 2

Ire Aderinokun

Slide 3

Slide 3

Why is
Accessibility Important?

Slide 4

Slide 4

Slide 5

Slide 5

  1. Accessible Site’s are
    Great for Everyone

Slide 6

Slide 6

“Abled” or “Disabled”?

Slide 7

Slide 7

Slide 8

Slide 8

???

Slide 9

Slide 9

Slide 10

Slide 10

Temporary and Situational

Disabilities

Slide 11

Slide 11

Vision “Abled” Temporarily Disabled Situationally Disabled “Disabled”

Slide 12

Slide 12

Hearing “Abled” Temporarily Disabled Situationally Disabled “Disabled”

Slide 13

Slide 13

Slide 14

Slide 14

  1. The web, by default ,
    is Accessible

Slide 15

Slide 15

Slide 16

Slide 16

http://motherfuckingwebsite.com

Slide 17

Slide 17

#UseThePlatform

<header> <button> <main> <footer> <input type=“password”> <a>

Slide 18

Slide 18

Using a <button> < button onClick =“ openModal(e) ”

Open Modal
</ button

Slide 19

Slide 19

What you get for free • Focusable via the keyboard or screen reader • Clickable by mouse , enter key and space bar

• Accessible name and state provided to assistive tech • An interaction is expected when clicked

Slide 20

Slide 20

Slide 21

Slide 21

Using a <div> < div

onClick =“ openModal(e) ”

Open Modal </ div

Slide 22

Slide 22

Extra Work < div

tabindex =“ 0 ”

role =“ button ”

onKeyPress =“ handleBtnKeyPress(e) ”

onClick =“ openModal(e) ”

Open Modal </ div

Slide 23

Slide 23

More Extra Work function handleBtnKeyPress (e) {

// Check to see if space or enter were pressed

if ( e.keyCode === 32 || e.keyCode === 13) {

// Open modal dialog

openModal(e); 

} } Source: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role

Slide 24

Slide 24

Even More Extra Work [ role =“button”] { align-items: flex-start; text-align: center; cursor: default; color: buttontext; background-color: buttonface; box-sizing: border-box; padding: 2px 6px 3px; border-width: 2px; border-style: outset; border-color: buttonface; border-image: initial; text-rendering: auto; letter-spacing: normal; word-spacing: normal; text-transform: none; text-indent: 0px; text-shadow: none; display: inline-block; margin: 0em; font: 11px system-ui; -webkit-appearance: button; }

Slide 25

Slide 25

Slide 26

Slide 26

– A Wise Person on Twitter “HTML is, by

default , accessible . As developers, it is our job to not fuck that up.”

Slide 27

Slide 27

  1. The web is for everyone

Slide 28

Slide 28

Slide 29

Slide 29

  1. It doesn’t have to be hard

Slide 30

Slide 30

< button

Open Modal
</ button

< div

Open Modal
</ div

Accessible vs Inaccessible

Slide 31

Slide 31

How Do I Get Started
With Accessibility?

Slide 32

Slide 32

https://www.w3.org/TR/WCAG20 https://www.w3.org/TR/WCAG20

Slide 33

Slide 33

Perceivable Information and user interface components must be presentable to users in ways they can perceive Operable User interface components and navigation must be operable Understandable Information and the operation of user interface must be understandable Robust Content must be robust enough
that it can be interpreted reliably
by a wide variety of user agents,
including assistive technologies

Slide 34

Slide 34

Perceivable Information and user interface components must be presentable to users in ways they can perceive Operable User interface components and navigation must be operable Understandable Information and the operation of user interface must be understandable Robust Content must be robust enough
that it can be interpreted reliably
by a wide variety of user agents,
including assistive technologies

Slide 35

Slide 35

< img

src =“ire.png” alt =“Ire Aderinokun Illustration”> Text Alternatives

Slide 36

Slide 36

Contrast Ratio http://leaverou.github.io/contrast-ratio

Slide 37

Slide 37

Perceivable Information and user interface components must be presentable to users in ways they can perceive Operable User interface components and navigation must be operable Understandable Information and the operation of user interface must be understandable Robust Content must be robust enough
that it can be interpreted reliably
by a wide variety of user agents,
including assistive technologies

Slide 38

Slide 38

Keyboard Accessible

Slide 39

Slide 39

Perceivable Information and user interface components must be presentable to users in ways they can perceive Operable User interface components and navigation must be operable Understandable Information and the operation of user interface must be understandable Robust Content must be robust enough
that it can be interpreted reliably
by a wide variety of user agents,
including assistive technologies

Slide 40

Slide 40

Specify Language < html

lang =“en”>

Slide 41

Slide 41

Provide Instructions

Slide 42

Slide 42

Perceivable Information and user interface components must be presentable to users in ways they can perceive Operable User interface components and navigation must be operable Understandable Information and the operation of user interface must be understandable Robust Content must be robust enough
that it can be interpreted reliably
by a wide variety of user agents,
including assistive technologies

Slide 43

Slide 43

Write Valid Code <! doctype

html

< html

lang =“en”> < head

<

meta

charset =“UTF-8”> < title

My Web Page</ title

</ head

< body

<

h1

My Web Page</ h1

</ body

</ html

Slide 44

Slide 44

Label Elements < label

for =“username”> Username </ label

< input

name =“username” id =“username”

type =“text”> < button

aria-label =“Cancel”> X </ button

Slide 45

Slide 45

Slide 46

Slide 46

Lighthouse

Slide 47

Slide 47

Chrome Developer Tools > Audits > Perform an Audit

Slide 48

Slide 48

pa11y

Slide 49

Slide 49

npm install -g pa11y pa11y example.com

Slide 50

Slide 50

Slide 51

Slide 51

Slide 52

Slide 52

Slide 53

Slide 53

Slide 54

Slide 54

Slide 55

Slide 55

Slide 56

Slide 56

https://bitsofco.de/pa11y https://github.com/ireade/bitsofcode-pa11y

Slide 57

Slide 57

Inclusive components

Slide 58

Slide 58

Re-usable components Cards Data Tables Content Slider Tabs Tooltips & Toggletips Notifications

Slide 59

Slide 59

Chrome Extensions

Slide 60

Slide 60

Alix https://github.com/ireade/alix

Slide 61

Slide 61

Accessibility Developer Tools https://chrome.google.com/webstore/detail/ accessibility-developer-t/ fpkknkljclfencbdbgkenhalefipecmb

Slide 62

Slide 62

HTML5 Outliner https://chrome.google.com/webstore/detail/ html5-outliner/ afoibpobokebhgfnknfndkgemglggomo/ reviews

Slide 63

Slide 63

No Coffee https://accessgarage.wordpress.com/ 2013/02/09/458/

Slide 64

Slide 64

User Research

Slide 65

Slide 65

https://www.youtube.com/watch?v=d3VuWAdBq9g

Slide 66

Slide 66

Test it Yourself!

Slide 67

Slide 67

Go Keyboard-Only

Slide 68

Slide 68

Try a Screen Reader

Slide 69

Slide 69

System Preferences > Accessibility > VoiceOver > “Enable VoiceOver”

Slide 70

Slide 70

https://www.chromevox.com

Slide 71

Slide 71

How Can I Make
Accessibility Easy?

Slide 72

Slide 72

Slide 73

Slide 73

Make Accessibility a
First Class Citizen

Slide 74

Slide 74

Make Accessibility Everyone ’s Job

Slide 75

Slide 75

http://accessibility.voxmedia.com

Slide 76

Slide 76

Slide 77

Slide 77

Slide 78

Slide 78

Slide 79

Slide 79

Slide 80

Slide 80

Slide 81

Slide 81

Accessibility is only
hard when you do it
last

Slide 82

Slide 82

– Leonie Watson “Accessibility doesn't have to be perfect, it just needs to be a little bit better than yesterday.”

Slide 83

Slide 83

Thank You! @IreAderinokun www.ireaderinokun.com