How To Build An Accessible Web ApplicationPresentation Transcript
How to Build an Accessible Web Application (Easy Chirp) Presented by Dennis Lembrée Accessibility DC Meet-up Martin Luther King (MLK) Library November 15, 2011
Agenda
Intro
Foundation
HTML
CSS [and Design]
JavaScript
ARIA
Writing
Tips
Results
Other Resources
Contact
Questions
Intro
Author of Easy Chirp.
Author of Web Axe.
Day job at PayPal.
Also worked for RIM, Ford, Google & Disney.
Live in Cupertino, CA with wife and 2 boys.
Foundations
HTML
CSS
JavaScript
ARIA
5 Layers of Web Accessibility by Dirk Ginader
+CSS for JavaScript
Foundations
Our example: Easy Chirp
Web-accessible and standards-compliant Twitter web application.
Winner of the AFB 2011 Access Award .
Winner of the 2009 Access IT @web2.0 Award .
HTML
Semantics
Accessibility
Graceful degradation
Easier to maintain
SEO
Content Order = Source Order = Tab Order
HTML
Headings
Forms
Tables
Lists
Use the title attribute sparingly.
Not HTML:
Put CSS & JavaScript in external files.
HTML
Headings Example
One H1.
Brief, succinct text.
Nicely nested.
Ensure inclusion of all sections of main content.
HTML
Validate.
Important, but don’t go overboard.
User experience is ultimate test.
Test semantics, order.
Turn off CSS.
Check doc structure.
Text-only browser such as Lynx.
Check often on different browsers and devices.
HTML
“ Naked” Easy Chirp
HTML
HTML5
More native power
Lighter code
Exciting
Currently browser and accessibility/AT issues
http://html5accessibility.com/
Use carefully and with fallbacks.
CSS & Design
Consistent layout & navigation.
Display account name/info.
Opportunity to logout.
Provide search.
CSS & Design
Relative sizing
Flexible width
Adaptive layout
For different screen resolutions
For different devices
Responsive Web Design (ALA)
media query
Next slide: Easy Chirp at 1024 x 768, 200%
CSS & Design
Sufficient text size.
16 PIXELS For Body Copy . Anything Less Is A Costly Mistake.
Make links focusable and visually clear.
Use :focus with :hover
Don’t remove the link underline in body copy.
Never do :focus { outline: 0; } outlinenone.com
CSS & Design
Easy Chirp’s links are keyboard accessible.
And have clear visual focus.
CSS & Design
Colors
Not for meaning alone.
Also use shapes as well as textual content.
Provide sufficient contrast.
Contrast Rebellion
CSS & Design
Hide content with discretion.
Labeling a form element that has meaning conveyed visually (phone number).
Providing headings where related content has meaning conveyed visually, but not otherwise, such as a menu.
“ skip-to” links (should be focusable and viewable for sighted keyboard users)
Instructions in special cases where interaction may be confusing to users of assistive technology.
When and How to Visually Hide Content
JavaScript
Progressive Enhancement, Unobtrusive
Libraries
YUI3
jQuery, jQueryUI
jQuery UI Accessibility Review by Everett Zufelt
Hijax (Jeremy Keith, 2006) .
Develop server-side first.
Then “hijack” and enhance behavior with JS.
JavaScript
focus() is your friend.
Managing focus is essential for accessibility as well as usability.
tabindex not dead.
tabindex=0 makes element tabbable
tabindex=-1 makes element tabbable only with JavaScript
JavaScript
JavaScript
JavaScript
Device Independence
Handlers:
If you use the onMouseOver and onMouseOut JavaScript handlers, you must also use onFocus and onBlur .
Do not use the double-click handler onDblClick .
ARIA
Accessible Rich Internet Applications (WAI-ARIA) 1.0 http://www.w3.org/TR/wai-aria/