56
Tales from the Accessibility Trenches Graeme Coleman, Mark Palmer @graemecoleman, @caledoniaman

Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Embed Size (px)

DESCRIPTION

My set of slides for the talk Mark Palmer and I gave at the Highland Fling Sessions in Edinburgh on 19th April 2014

Citation preview

Page 1: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Tales from the Accessibility Trenches

Graeme Coleman, Mark Palmer@graemecoleman, @caledoniaman

Page 2: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Who are we?

• Graeme Coleman (@graemecoleman)– Accessibility consultant at The Paciello

Group (http://www.paciellogroup.com)

• Mark Palmer (@caledoniaman)– Independent accessibility consultant– [email protected]

Page 3: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

• Was once a trainee accountant here in Edinburgh…

• Had a bit (but not a lot) of web development experience

• MSc then PhD at the University of Dundee

• Joined the Digital Media Access Group in 2007

Graeme’s Background

Page 4: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

• UI Developer for HBOS for 7 years• Accessibility consultant with an

Edinburgh UX consultancy for 7 years• Currently employed within the Civil

Service as UX Specialist• Also freelancing as an Accessibility

Consultant

Mark’s Background

Page 5: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

What interests us?

How can we ensure that the content we put on the web is accessible to everyone, including people with disabilities?

Page 6: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

The stats

• 650 million people worldwide have a disability of some kind

• That’s around 10% of us…!

• By the time we retire, over 30% of us will have some form of disability (however minor)

Source: “A Web for Everyone” (Horton & Quesenbery, 2013)

Page 7: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Forms of disability

• Our users may be:– Blind (and use a screen reader)– Visually impaired (and use a screen

magnifier)– Color blind (and unable to distinguish

between, say, red and green)–Mobility impaired (which prevents or limits

use of the mouse)– Cognitively impaired (for example, dyslexia,

and use a Windows high contrast theme)

Page 8: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Forms of disability

• Our users may also be:

– Older people with a combination of minor age related impairments

– Using a small screen device– Coping with fatigue, weakness, or stress

Page 9: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Design for Flexibility

• We have no idea:

–Who will be accessing our content

–How they will be accessing our content

Page 10: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

How did I get involved in web accessibility?

Page 11: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

“When I grow up, I want to be a web accessibility consultant!”- No

Page 12: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Early Days

I HAVE NO IDEAWHAT I’M DOING

Page 13: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014
Page 14: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Source:

http://creativenerds.co.uk/freebies/slick-but-clean-free-social-media-icon-set/

Page 15: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014
Page 16: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014
Page 17: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

I’m a web accessibility consultant

What do you do?

Page 18: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

…yeah, we don’t have

the capacity to make

these changes

Web accessibility is important because…

Page 19: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014
Page 20: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

http://www.slideshare.net/johnfoliot/fireman-cop

Page 21: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014
Page 22: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

The Blue Meanie

Source: https://flic.kr/p/4z4EkR

Page 23: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

It’s not accessible. Do you like

my new widget? Took me months to build, and…

Negative mantra

Page 24: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

No. But…can you help

me make it accessible?

Limited or no remediation advice

Page 25: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

FIX ALL THE

THINGS!Where do I

start…

Limited or no help with prioritizing

Page 26: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

…I don’t know if I have the resources,

time, budget…

No awareness of organization’s structure

Page 27: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

I don’t know if I have the resources,

time, budget…

No awareness of organization’s structure

FIX ALL THE

THINGS!

Page 28: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

A positive approach

• Clearly explain why something poses an accessibility barrier

• Provide illustrative examples, with steps to reproduce if necessary

• Provide clear recommendations for remediation, with code if necessary

• Help the client prioritize based on accessibility impact and resources required

Page 29: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

My perspective on accessibility

• You should not have to completely redesign your site (except in very, very, very rare circumstances)

• Most accessibility advice will remediate issues “under the hood”

• The main aesthetic/visible changes I may suggest relate to:– colour contrast, table reorganization,

and sectioning content

Page 30: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Six Accessibility Tips

Page 31: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Tip 1:

Don’t assume specific input devices

Page 32: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014
Page 33: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

• Test that interactive components can be accessed via the keyboard:– Can you “tab” to it using the Tab key?– Does it respond to the Enter key/space bar?

• Make sure that:– There is a clear indication of focus (don’t

use outline: none;)– Navigation order is logical– Custom dialog boxes “grab” focus (but

watch for keyboard traps)

Page 34: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Tip 2:

Use semantic markup

Page 35: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

• Give each page an appropriate title – The first item a screen reader will

announce when the page is opened

• Provide a logical heading structure• Use HTML elements as per the

specification:– Use list elements for lists, button

elements for buttons, table elements for data tables…

• http://www.paciellogroup.com/resources/wat

Page 36: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

But:

What about custom widgets?

Page 37: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Tip 3:

WAI-ARIA

Page 38: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

• Web Accessibility Initiative Accessible Rich Internet Applications

• Provides additional semantic meaning to HTML elements for use by assistive technologies

• As of 20th March 2014, WAI-ARIA is a W3C recommendation

• http://www.w3.org/TR/wai-aria/

Page 39: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

WAI-ARIA example

<div>Custom Button</div>

Page 40: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

WAI-ARIA example

Note:Further scripting is required to ensure the

above responds to both Enter and Space keyshttp://blog.paciellogroup.com/2011/04/html5-

accessibility-chops-just-use-a-button/

<div role=“button”>Custom Button</div>

Page 41: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

WAI-ARIA – the caveats

• If a native element already exists, use it!– It will already have the necessary semantics

and behaviour built in by default

• Use WAI-ARIA when:– Styling possibilities for the native element

are limited– The feature is not (yet) available/well

supported in HTML (e.g. a dialog box, treeview)

• http://www.w3.org/TR/aria-in-html/

Page 42: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

WAI-ARIA design patterns

http://www.w3.org/TR/wai-aria-practices/#aria_ex

Page 43: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Don’t reinvent the wheel…

http://hanshillen.github.io/jqtest/

Page 44: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Tip 4:

Progressively enhance

Page 45: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

“Just stop saying that JavaScript as a platform is by its very existence an accessibility problem. It's not, and saying so is an obstacle to all of the people working to use it to the advantage of everyone.’”

Matt May, December 2012http://lists.w3.org/Archives/Public/w3c-wai-ig/2012OctDec/0223.html

Page 46: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Percentage of screen reader users who browse with JavaScript enabled (total n=1465):

97.6%

WebAIM screen reader survey 5, Feb. 2014http://webaim.org/blog/survey-5-results/

Page 47: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

• Take a “content first” approach– Everyone gets access to the important

information

• A content first approach provides a fallback for breakage– This will give you an idea of how

assistive technology users experience your site

Page 48: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Tip 5:

Use colour sensibly

Page 49: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

• Can you distinguish between foreground and background colour combinations?

• Problematic when viewing on a mobile device outside in the sunshine

• Pro Tip: Print the page out in greyscale – is it still readable?

Page 50: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

• Can you distinguish between foreground and background colour combinations?

• Problematic when viewing on a mobile device outside in the sunshine

• Pro Tip: Print the page out in greyscale – is it still readable?

Page 51: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

GoodBad

Choose a colour for your t-shirt: Choose a colour for your t-shirt

X

Red

Green

Blue

Yellow

Required fields are indicated in red text * = Required Field

First name:

Middle name:

Surname:

First name: *

Middle name:

Surname: *

http://24ways.org/2012/colour-accessibility/

Page 52: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Tools for checking use of color

• Colour Contrast Analyser: – http://www.paciellogroup.com/resources/

contrastAnalyser

• Color Contrast Check:– http://snook.ca/technical/colour_contrast/

colour.html

• Luminosity Colour Contrast Ratio Analyser:– http://juicystudio.com/services/

luminositycontrastratio.php

Page 53: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Tip 6:

Ask

Page 54: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

• Involve different types of users (and accessibility consultants!) in the design process, from as early as possible

• Ask assistive technology users to demonstrate how they use their devices

• There are many videos on YouTube of people using assistive devices – check them out!

Page 55: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Useful Resources

• TPG blog: http://blog.paciellogroup.com/

• Marco’s blog: http://www.marcozehe.de/

• WebAIM: http://webaim.org/

Page 56: Tales from the Accessibility Trenches - Highland Fling talk, Edinburgh, 19th April 2014

Thank You!

Graeme Coleman@graemecoleman

Now over to Mark…