Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Merging Ajax and Accessibility

Mark Meeker
September 05, 2008

Merging Ajax and Accessibility

The Rich Web Experience - September, 2008

Mark Meeker

September 05, 2008
Tweet

More Decks by Mark Meeker

Other Decks in Technology

Transcript

  1. “ The power of the Web is in its universality.

    Access by everyone regardless of disability is an essential aspect.” - Tim Berners-Lee
  2. • Filters • Transitions • Auto-complete • Calendar Pickers •

    Collapse • Drag and Drop • Lightboxes • Yellow Fade • Auto Update • Hover • Tabs • Rating Widgets • Sliders • Micro-content • Auto-fill • Expand / Collapse • Inline Validation • Zoom • Navigation • Auto Refresh • Carrousel • Inline edit Interaction Patterns
  3. Screen readers don’t understand JavaScript. M Y T H Screen

    readers run on top of everyday browsers which are JavaScript enabled. F A C T
  4. Supporting accessibility for Ajax just means having a <noscript />

    state. M Y T H While there are many benefits to a site that works without scripting enabled, accessibility deals with many other areas. F A C T
  5. Accessibility only benefits blind users. M Y T H Accessibility

    improvements are targeted towards and assist users with numerous disabilities (and even users without!). F A C T
  6. Scope • Blind, low vision, color blindness • Limited mobility

    • Learning disabilities • Deaf, hearing impaired
  7. Scope • Screen readers • Braille displays • Screen magnification

    • Keyboard only navigation • Speech recognition
  8. 6.3 Ensure that pages are usable when scripts, applets, or

    other programmatic objects are turned off or not supported. If this is not possible, provide equivalent information on an alternative accessible page. WCAG 1.0
  9. • Content is king! • Start with POSH - Plain

    Old Semantic HTML • Semantic markup to supply meaning to content • Serve base content to everyone • Add presentation and behavior to enhance experience Progressive Enhancement
  10. Progressive Enhancement 1 2 3 4 HTML CSS JS 

              
  11. The Long Tail • Universality • Multiple Devices • Graded

    Browser Support • Search Engine Friendly
  12. <img src=”/map/image” /> <ul> <li><a href=”/map/move?dir=n”>North</a></li> <li><a href=”/map/move?dir=e”>East</a></li> <li><a href=”/map/move?dir=s”>South</a></li>

    <li><a href=”/map/move?dir=w”>West</a></li> ... </ul> <ul> <li><a href=”/map/zoom?level=1”>Zoom Level 1</a></li> <li><a href=”/map/zoom?level=2”>Zoom Level 2</a></li> <li><a href=”/map/zoom?level=3”>Zoom Level 3</a></li> ... </ul>
  13. • Filters • Transitions • Auto-complete • Calendar Pickers •

    Collapse • Drag and Drop • Lightboxes • Yellow Fade • Auto Update • Hover • Tabs • Rating Widgets • Sliders • Micro-content • Auto-fill • Expand / Collapse • Inline Validation • Zoom • Navigation • Auto Refresh • Carrousel • Inline edit Interaction Patterns
  14. • Filters • Transitions • Auto-complete • Calendar Pickers •

    Collapse • Drag and Drop • Lightboxes • Yellow Fade • Auto Update • Hover • Tabs • Rating Widgets • Sliders • Micro-content • Auto-fill • Expand / Collapse • Inline Validation • Zoom • Navigation • Auto Refresh • Carrousel • Inline edit Interaction Patterns
  15. Hijax • Term coined by Jeremy Keith • Bulletproof Ajax

    (http://bulletproofajax.com/) • Pull in portion of page via Ajax when XHR is supported • Re-use same portion when a full page refresh is required
  16. Hijax Header Footer Rail Module 1 Login Module Module 2

    JS-Enabled XHR noscript page transition Login Module
  17. • Offer multiple input options • GUI input and keyboard

    input • Enhance visual cues with text-based cues • Look to desktop interfaces for patterns • Seek out CLI developers for testing Redundant Inputs
  18. State/ Province Zip/Postal Code Examples No Yes United Kingdom, France,

    Germany Drop Down Yes United States, Canada, Australia Input Yes No No Ireland Linearization
  19. Tab Index Tab Index Focusable with mouse or element.focus() Navigable

    via tab key Not present Follows default behavior of element (only form controls and anchors receive focus) Follows default behavior of element > 0 Yes Tabindex value directly specifies where this element is positioned in the tab order. 0 Yes In tab order relative to element’s position in document -1 Yes Not in tab order. http://www.dojotoolkit.org/book/export/html/118
  20. Updating the Buffer function prepareBuffer() { var objNew = document.createElement('p');

    var objHidden = document.createElement('input'); objHidden.setAttribute('type', 'hidden'); objHidden.setAttribute('value', '1'); objHidden.setAttribute('id', 'virtualbufferupdate'); objHidden.setAttribute('name', 'virtualbufferupdate'); objNew.appendChild(objHidden); document.body.appendChild(objNew); } function updateBuffer() { var objHidden = document.getElementById('virtualbufferupdate'); if (objHidden) { if (objHidden.getAttribute('value') == '1') objHidden.setAttribute('value', '0'); else objHidden.setAttribute('value', '1'); } } http://juicystudio.com/article/improving-ajax-applications-for-jaws-users.php
  21. • <div> can be a button • <span> can be

    a slider • Need a better API • Leverage accessibility support in the OS Replicating the Desktop
  22. • W3C Web Accessibility Initiative Accessible Rich Internet Applications •

    Adds hooks into accessibility API of the platform • Define Roles and States so scripts can interact with AT APIs • http://www.w3.org/WAI/ WAI - ARIA
  23. • link • combobox, options • checkbox • radio, radiogroup

    • button • progressbar • slider • spinbutton • tree,treeitem • application • presentation • group • grid, gridcell • tab, tablist, tabpanel • list, listitem • menu, menubar • toolbar • alert Roles
  24. • Do user testing with Assistive Technologies (AT) • Developers

    @#$% at testing interfaces • Test with AT to validate decisions • Test to make sure its usable Testing
  25. • Lists of headings • Text equivalents for images •

    Disable scripting, mouse events • Validation and testing tools • Zoom Toolbars
  26. • Start with new features • Learn the patterns •

    Don’t make things worse • Apply lessons learned when re-factoring existing code Getting Started
  27. “For most people, technology makes things easier. For people with

    disabilities, technology makes things possible.” - President’s Council on Disability
  28. • Traffic sign images are from the Manual of Traffic

    Signs, by Richard C. Moeur • http://www.trafficsign.us Traffic Signs