Top Banner
Web Accessibility for the 21st Century Denise Paolucci, Dreamwidth Studios [email protected] http://denise.dreamwidth.org
100

Web Accessibility for the 21st Century

Dec 04, 2014

Download

Technology

dreamwidth

You know it's important for your web project to be accessible to people who use all kinds of assistive technology to access the internet. But all the guidelines for web accessibility you can find don't go much beyond "make sure all your images have alt text", and all the resources you can find treat "accessibility" as a synonym for "making your site work in a screen reader". You know there are other things you should be doing and other forms of assistive technology you should be accomodating, but all the best practices documents are a complicated morass of contradicting information (if you can find best practices documents at all.)

Have no fear! This tutorial gives you a number of concrete steps to take to make things more accessible.

This presentation has downloadable notes and exercises available at http://denise.dreamwidth.org/tag/a11y . Video of the talk should be available later.
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: Web Accessibility for the 21st Century

Web Accessibility for the 21st Century

Denise Paolucci, Dreamwidth [email protected]

http://denise.dreamwidth.org

Page 2: Web Accessibility for the 21st Century

Slides, resources, and examples downloadable

at end of talk!

Page 3: Web Accessibility for the 21st Century

What do we mean by “accessibility”?

Page 4: Web Accessibility for the 21st Century

“Accessibility” is about making websites work with assistive tech, not

against it.

Page 5: Web Accessibility for the 21st Century

Multiple standards

• W3C’s Web Content Accessibility Guidelines

• WebAIM (Web Accessibility in Mind)

• US Government’s Section 508 Standards

Page 6: Web Accessibility for the 21st Century
Page 7: Web Accessibility for the 21st Century

:(

• Standards/guidelines are all very high level

• And have specific ideas about what accessibility needs people have

• People have more accessibility needs than you think

Page 8: Web Accessibility for the 21st Century

• Blind/low-vision users using screenreaders (Jaws, NVDA, VoiceOver)

• Users unable to type using dictation software (Dragon)

• Users unable to mouse using keyboard-only navigation/mousekeys

People think of:

Page 9: Web Accessibility for the 21st Century

It’s not just about screenreaders

(or dictation, or keybord input)

Page 10: Web Accessibility for the 21st Century

What’s the most commonly used

assistive technology?

Page 11: Web Accessibility for the 21st Century
Page 12: Web Accessibility for the 21st Century
Page 13: Web Accessibility for the 21st Century

Larger text size is the most common assistive

tech on the internet (even if you don’t think

it’s assistive tech)

Page 14: Web Accessibility for the 21st Century

Also:• Stylish

• NoScript

• NoSquint

• F.lux

• Disabling animation

• “Zap CSS” bookmarks

• Disabling autoplay/sound

• AdBlock

• AutoPager

• Workrave

• TypeAhead Find

• ....etc

Page 15: Web Accessibility for the 21st Century

• Migraineurs

• People with cognitive disabilities

• Dyslexic users

• Colorblind users

• Deaf users

Page 16: Web Accessibility for the 21st Century

So how do you serve all these accessibility

needs?

Page 17: Web Accessibility for the 21st Century

...sometimes you don’t:(

(but you can try!)

Page 18: Web Accessibility for the 21st Century

Don’t make a special version: it never works

Page 19: Web Accessibility for the 21st Century

Universal Design

• Improves accessibility

• Improves your cross-platform support

• And your search engine visibility

• Everybody wins!

Page 20: Web Accessibility for the 21st Century

A light speed tour of Universal Design

(this will not be on the exam)

Page 21: Web Accessibility for the 21st Century

Universal Design Principles

• NC State University’s Center for Universal Design has 7 principles

• Not all of them apply to web design

• The five that do are:

Page 22: Web Accessibility for the 21st Century

1. Equitable Use

Page 23: Web Accessibility for the 21st Century

1. Equitable Use2. Flexibility in Use

Page 24: Web Accessibility for the 21st Century

1. Equitable Use2. Flexibility in Use

3. Simple and Intuitive Use

Page 25: Web Accessibility for the 21st Century

1. Equitable Use2. Flexibility in Use

3. Simple and Intuitive Use4. Perceptible Information

Page 26: Web Accessibility for the 21st Century

1. Equitable Use2. Flexibility in Use

3. Simple and Intuitive Use4. Perceptible Information

5. Tolerance for Error

Page 27: Web Accessibility for the 21st Century
Page 28: Web Accessibility for the 21st Century

those are REALLY high level guidelines :(

Page 29: Web Accessibility for the 21st Century

• There are a lot of checklists for implementing the high-level guidelines

• Many of them disagree

• A lot of the advice is outdated and not very helpful

Page 30: Web Accessibility for the 21st Century
Page 31: Web Accessibility for the 21st Century

<i>Let's</i> be <b>ACCESSIBLE!</b>

Page 32: Web Accessibility for the 21st Century

<i>Let's</i> be <b>ACCESSIBLE!</b>

<em>Let's</em> be <strong>ACCESSIBLE!</strong>

Page 33: Web Accessibility for the 21st Century
Page 34: Web Accessibility for the 21st Century

Let’s be ACCESSIBLE!

Page 35: Web Accessibility for the 21st Century

Let’s be ACCESSIBLE!

Let’s be ACCESSIBLE!

Page 36: Web Accessibility for the 21st Century

Semantic markup isn’t wrong...

Page 37: Web Accessibility for the 21st Century

But most screenreaders don’t differentiate

Page 38: Web Accessibility for the 21st Century

(because most of the web doesn’t differentiate)

Page 39: Web Accessibility for the 21st Century

you are in a maze of twisty little best

practices, all competing

Page 40: Web Accessibility for the 21st Century

and automated testing tools don’t catch

everything

Page 41: Web Accessibility for the 21st Century
Page 42: Web Accessibility for the 21st Century

31 Quick Techniques To Make Your Site Better

These are all downloadable at the end, with exercises and further reading :)

Page 43: Web Accessibility for the 21st Century

1. Make sure all images have alt attributes, height, and width

Page 44: Web Accessibility for the 21st Century

Bad:<img src="image.png" />

Page 45: Web Accessibility for the 21st Century

Better:<img src="image.png" height=480 width=600 alt="Woman laughing with salad" />

(writing good alt text is an art, not a science.)

Page 46: Web Accessibility for the 21st Century

2. Use blank alt text for purely decorative

images

Page 47: Web Accessibility for the 21st Century

Bad:<img src="spacer-left-red.gif" /><img src="spacer-left-red.gif" /><img src="spacer-left-red.gif" /><img src="spacer-left-red.gif" /><img src="spacer-left-red.gif" />

Page 48: Web Accessibility for the 21st Century

Just as bad:<img src="spacer-left-red.gif"

alt="spacer" /><img src="spacer-left-red.gif"

alt="spacer" /><img src="spacer-left-red.gif"

alt="spacer" /><img src="spacer-left-red.gif"

alt="spacer" /><img src="spacer-left-red.gif"

alt="spacer" />

Page 49: Web Accessibility for the 21st Century

Better:<img src="spacer-left-red.gif"

alt="" /><img src="spacer-left-red.gif"

alt="" /><img src="spacer-left-red.gif"

alt="" /><img src="spacer-left-red.gif"

alt="" /><img src="spacer-left-red.gif"

alt="" />

Page 50: Web Accessibility for the 21st Century

Best:Use CSS to place purely decorative images, not <img>

Page 51: Web Accessibility for the 21st Century

3. Use header tags (<h1>, <h2>, etc)Screenreaders use those as jump-to points

Page 52: Web Accessibility for the 21st Century

4. Add skip links liberally

(Screenreaders use headers for navigation, but skip links still save the time of skipping through all the headers.)

Page 53: Web Accessibility for the 21st Century

5. In your source: Content first, chrome

after(and then position it visually using CSS)

Page 54: Web Accessibility for the 21st Century

6. Use CSS to hide screenreader-useful things from visual

browsersUse negative margins, not “display: none”

Page 55: Web Accessibility for the 21st Century

7. Write link text descriptively

Page 56: Web Accessibility for the 21st Century

Bad:To manage your account, <a href="link">click here</a>.

Page 57: Web Accessibility for the 21st Century

Better:Visit <a href="link"> Account Management</a> to change your settings.

Page 58: Web Accessibility for the 21st Century

8. Don’t rely on tooltips or title text

Information in title tooltips is missed by large numbers of your readers

Page 59: Web Accessibility for the 21st Century
Page 60: Web Accessibility for the 21st Century
Page 61: Web Accessibility for the 21st Century

9. Don’t rely on alt text, either

It’s nearly impossible to reach in most visual browsers

Page 62: Web Accessibility for the 21st Century

10. Make title text and alt text the same

This is controversial, since standards say they must be different, but it’s the only way to avoid information

being unreachable.

Page 63: Web Accessibility for the 21st Century

11. Explicitly label all form fields

And put any important instructions inside the form, not in a note outside the form

Page 64: Web Accessibility for the 21st Century

Bad:<form>Name: <input type="text" name="name" /></form>

Page 65: Web Accessibility for the 21st Century

Better:<form><label for="name">Name:</label> <input name="name" id="name" type="text" /></form>

Page 66: Web Accessibility for the 21st Century

Best:<form><label for="name">Name:</label> <input name="name" id="name" type="text" aria-labelledby="Name:"/></form>

Page 67: Web Accessibility for the 21st Century

Best:<form><label for="name">Name:</label> <input name="name" id="name" type="text" aria-labelledby="Name:"/></form>

Page 68: Web Accessibility for the 21st Century

ARIA or WAI-ARIA

• Web Accessibility Initiative-Accessible Rich Internet Applications

• Labels and describes page content and advanced “rich technology” like DHTML, Ajax, JavaScript

• Client implementation spotty, but...

Page 69: Web Accessibility for the 21st Century

12. Use WAI-ARIA landmark roles

Client implementation is getting better and better, and there’s zero downside to using it

Page 70: Web Accessibility for the 21st Century

13. Use existing JavaScript libraries

Don’t reinvent the wheel: JQuery isn’t 100% accessible, but it’s better than rolling your own

Page 71: Web Accessibility for the 21st Century

14. Make sure everything has a

tabindex

Page 72: Web Accessibility for the 21st Century

15. Put important things earlier in the tabindex

Use this VERY SPARINGLY, but less-used items can be later in the tabindex. (But don’t interrupt visual flow.)

Page 73: Web Accessibility for the 21st Century

16. Don’t hide any visible element from

the keyboard

Page 74: Web Accessibility for the 21st Century

Wikipedia’s article rating widget

Unreachable via the keyboard :(

Page 75: Web Accessibility for the 21st Century

17. Never use tables unless presenting

tabular data

Page 76: Web Accessibility for the 21st Century
Page 77: Web Accessibility for the 21st Century
Page 78: Web Accessibility for the 21st Century

18. And if you need tables, use <th>

headers (and ARIA roles)

Page 79: Web Accessibility for the 21st Century

19. Use <ul> or <ol> instead of image based

bullets

Page 80: Web Accessibility for the 21st Century

Bad:<img src="bullet.gif">Item One<img src="bullet.gif">Item Two<img src="bullet.gif">Item Three

Page 81: Web Accessibility for the 21st Century

Better:<ul><li>Item One</li><li>Item Two</li><li>Item Three</li></ul>

(then add the image with CSS)

Page 82: Web Accessibility for the 21st Century

20. Define all sizes in em, not px or pt

Page 83: Web Accessibility for the 21st Century

21. Restrict large blocks of text to a narrower

width

Page 84: Web Accessibility for the 21st Century

22. Check your color contrast

Standards say no less than 4.5:1 and recommend 7:1, but if possible, offer high-contrast and low-contrast

options, or let the user set their own colors

Page 85: Web Accessibility for the 21st Century

23. Avoid large blocks of pure white

background (cream or grey is better)

Page 86: Web Accessibility for the 21st Century

24. Provide light-on-dark and dark-on-light

options

Page 87: Web Accessibility for the 21st Century

25. Use at least two ways of highlighting

information or errors

Page 88: Web Accessibility for the 21st Century

Remember earlier?<form><label for="name">Name:</label> <input name="name" id="name" type="text" aria-labelledby="Name:"/></form>

Page 89: Web Accessibility for the 21st Century

Forms of Highlights

• Color

• Outline

• Underline

• Text change

• ARIA label (role="alert")

Page 90: Web Accessibility for the 21st Century

26. Retain user input after errors

Page 91: Web Accessibility for the 21st Century

27. Don’t change the screen without user

action

Page 92: Web Accessibility for the 21st Century

28. And if you do dynamic content, let people turn it off --

permanently

Page 93: Web Accessibility for the 21st Century

29. Don’t use Flash or PDFs: use plain text

Page 94: Web Accessibility for the 21st Century

30. Caption all audio and video (by people,

not machines)

Page 95: Web Accessibility for the 21st Century

31. Consider alternatives to

CAPTCHA

Page 96: Web Accessibility for the 21st Century

• Honeypot form field (with meaningless name, informative label, and display:none)

• Server-side checks (referer, secret token, length of time it took to submit)

• TextCaptcha.com: word-based CAPTCHA problems

Page 97: Web Accessibility for the 21st Century

And finally...

Page 98: Web Accessibility for the 21st Century

0. Test it yourselfYou aren’t going to be as skilled with the assistive tech

as an experienced user, but you can approximate

Page 99: Web Accessibility for the 21st Century

• Double your font size and see what breaks

• Unplug your mouse and see what you can’t reach or access

• Set your screen to black and white and see what’s unclear or invisible

• Have a screenreader read you the page and see what’s frustrating or missing

Page 100: Web Accessibility for the 21st Century

http://denise.dreamwidth.org/tag/a11y(that’s A, number one, number one, Y)

Resources

Thank you!