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

Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

Jul 16, 2015

Download

Technology

Léonie Watson
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: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

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

CREATING ACCESSIBLE

INTERFACESEVERYONE WANTS TO USE

Léonie Watson

Page 2: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@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: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ACCESSIBILIT Y S TIFLES INNOVATION

Page 4: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ACCESSIBILIT Y KILLS CREATIVIT Y

Page 5: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ACCESSIBILIT Y IS DIFFICULT

Page 6: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ACCESSIBILIT Y IS IRRELEVANT

Page 7: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

DESIGN LIKE DA VINCIBe curious about everything, and never stop

questioning how you can make things better

Page 8: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

PERFECT IS THE ENEMY OF GOOD

Page 9: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

DON’T CHUCK IT OVER THE WALL

Page 10: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

INTERACTION

Page 11: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

DESIGN

Page 12: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

CHOICE

Page 13: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

COMMUNICATE

Page 14: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@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: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ONCE MORE FROM THE TOP

Page 16: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

JUMPING AROUND

Page 17: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

LANDMARKS AHOY

Page 18: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

MODUS OPERANDI

something

Page 19: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ACCESSIBILIT Y MECHANICS

Page 20: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

DOM TREE

Page 21: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ACCESSIBILIT Y TREE

Page 22: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ROLE

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

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

Page 23: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

STATE

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

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

Page 24: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

PROPERTIES

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

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

Page 25: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@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: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

DESIGN LIKE BRUNELKnow that planning is important, but that

imagination makes the extraordinary possible

Page 27: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@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: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

USING A MOUSE

Page 29: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

USING A KEYBOARD

Page 30: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD ROLE

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

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

Page 31: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD TABINDEX

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

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

Page 32: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@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: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

ADD EVENT LISTENERS

document.getElementById("button").addEventListe

ner("click", toggleDisclosure);

document.getElementById("button").addEventListe

ner("keydown", toggleDisclosure);

Page 34: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@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: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@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: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@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: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@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: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@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: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@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: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@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: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

@LEONIEWATSON HTTP://LJWATSON.CO.UK

USING A SCREEN READER

Page 42: Creating accessible interfaces everyone wants to use (2015)Creating accessible interfaces 2015 04

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

Léonie Watson @leoniewatson