Top Banner
@ LEONIEWATSON HTTP://LJWATSON.CO.UK @LEONIEWATSON HTTP://LJWATSON.CO.UK CREATING ACCESSIBLE INTERFACES EVERYONE WANTS TO USE Léonie Watson
42

Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

Jul 21, 2015

Download

Design

Future Insights
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK@LEONIEWATSON HTTP://LJWATSON.CO.UK

CREATING ACCESSIBLE

INTERFACESEVERYONE WANTS TO USE

Léonie Watson

Page 2: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

DESIGN LIKE BANKSYRead the rule book, then rip it up and create

something that challenges the accepted wisdom

Page 3: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ACCESSIBILIT Y S TIFLES INNOVATION

Page 4: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ACCESSIBILIT Y KILLS CREATIVIT Y

Page 5: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ACCESSIBILIT Y IS DIFFICULT

Page 6: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ACCESSIBILIT Y IS IRRELEVANT

Page 7: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

DESIGN LIKE DA VINCIBe curious about everything, and never stop

questioning how you can make things better

Page 8: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

PERFECT IS THE ENEMY OF GOOD

Page 9: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

DON’T CHUCK IT OVER THE WALL

Page 10: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

INTERACTION

Page 11: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

DESIGN

Page 12: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

CHOICE

Page 13: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

COMMUNICATE

Page 14: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

DESIGN LIKE CHANELStrive for beauty and elegance, but understand that

those things will not be the same for everybody.

Page 15: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ONCE MORE FROM THE TOP

Page 16: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

JUMPING AROUND

Page 17: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

LANDMARKS AHOY

Page 18: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

MODUS OPERANDI

something

Page 19: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ACCESSIBILIT Y MECHANICS

Page 20: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

DOM TREE

Page 21: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ACCESSIBILIT Y TREE

Page 22: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ROLE

<input type="checkbox" id="drink" checked>

<label for="drink">Tequila</label>

Page 23: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

STATE

<input type="checkbox" id="drink" checked>

<label for="drink">Tequila</label>

Page 24: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

PROPERTIES

<input type="checkbox" id="drink" checked>

<label for="drink">Tequila</label>

Page 25: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ACCESSIBILIT Y APIS

MSAA/UIAutmoation Windows

IAccessible2 Windows Linux

AT-SPI Linux

NSAccessibility OSX

UIAccessibility iOS

Accessibility Framework Android

Page 26: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

DESIGN LIKE BRUNELKnow that planning is important, but that

imagination makes the extraordinary possible

Page 27: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

SKELETON HTML

<span id="button">Tequila <span

id="icon"></span></span>

<div id="content">Makes me happy...</div>

Page 28: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

USING A MOUSE

Page 29: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

USING A KEYBOARD

Page 30: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD ROLE

<span id="button" role="button”>

Tequila <span id="icon"></span></span>

Page 31: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD TABINDEX

<span id="button" role="button" tabindex="0”>

Tequila <span id="icon"></span></span>

Page 32: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD FOCUS VISUALS

[role="button"]:hover, [role="button"]:focus {

background-color: #333;

color: #fff;

text-shadow: 0 -1px 0 #444;

box-shadow: 0 1px 0 #666;

}

Page 33: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD EVENT LISTENERS

document.getElementById("button").addEventListe

ner("click", toggleDisclosure);

document.getElementById("button").addEventListe

ner("keydown", toggleDisclosure);

Page 34: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD KEYBOARD INTERACTION

function toggleDisclosure(event)

{

var type = event.type;

if (type === "keydown" && (event.keyCode !==

13 && event.keyCode !== 32))

{

return true

}

event.preventDefault();

}

Page 35: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD ARIA-EXPANDED

<span id="button" role="button"

tabindex="0" aria-expanded="false”>

Tequila <span id="icon"></span></span>

Page 36: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD STATE VISUALS

[role="button"][aria-expanded="false"] .icon:after {

content: ' ›';

}

[role="button"][aria-expanded="true"] .icon:after {

content: ' ×';

}

Page 37: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD ARIA-CONTROLS

<span id="button" role="button" tabindex="0"

aria-expanded="false" aria-controls="content">

Tequila <span id="icon"></span></span>

<div id="content">Makes me happy...</div>

Page 38: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD ARIA-HIDDEN

<span id="button" role="button" tabindex="0"

aria-expanded="false" aria-controls="content">

Tequila <span id="icon" aria-hidden="true">

</span></span>

<div id="content" aria-hidden="true">

Makes me happy</div>

Page 39: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD MORE STATE VISUALS

div[aria-hidden="true”] {

display: none;

}

div[aria-hidden="false”] {

display: block;

border: 1px #000 solid;

padding: 1em;

background: #555;

color: #FFF;

}

Page 40: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD FUNCTIONALIT Y

function toggleDisclosure(event)

{

var button = document.getElementById("button");

var content = document.getElementById("content");

if(content.getAttribute("aria-hidden") == "true")

{

content.setAttribute("aria-hidden", "false");

button.setAttribute("aria-expanded", "true");

}

else

{

content.setAttribute("aria-hidden", "true");

button.setAttribute("aria-expanded", "false");

}

}

Page 41: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK

USING A SCREEN READER

Page 42: Design Like You Give a Damn: Creating Accessible Interfaces that Everyone Wants to Use (Leonie Watson)

@LEONIEWATSON HTTP://LJWATSON.CO.UK@LEONIEWATSON HTTP://LJWATSON.CO.UK

Léonie Watson @leoniewatson