際際滷

際際滷Share a Scribd company logo
JavaScript and AJAX Accessibility Becky Gibson Web Accessibility Architect
Agenda What is AJAX and why do I care? What are the Issues with AJAX? How do I make my AJAX applications Accessible? Using HTML Techniques Using DHTML Accessibility Techniques Demonstration of techniques Summary
What is AJAX? AJAX = Asynchronous JavaScript and XML Allows incremental update of Web pages. Built using standard web technologies - HTTP, (X)HTML, CSS, JavaScript, Document Object Model (DOM), XML Used by many popular internet companies. Examples:  Google Suggests, Google & Yahoo! Maps Amazon A9 Search Flickr, BaseCamp, Kayak Yahoo! AJAX Library
Example  Yahoo! Sports
Traditional Web Interaction Client makes http request Web server Server returns a new page
How AJAX works Web server Client makes http request for specific information Server returns the requested information Multiple requests are served
Why Do I Care About AJAX? Enables building Rich Internet Applications (RIA) Allows dynamic interaction on the Web Improves performance Real-time updates No plug-ins required
What are the Issues with AJAX? User does not know updates will occur. User does not notice an update. User can not find the updated information. Unexpected changes in focus. Loss of Back button functionality*. URIs can not be bookmarked*. *These issues will not be discussed as they are not specific to accessibility.
Specific Accessibility Issues Assistive Technology users are not aware of updates Updates occur on a different section of the page than the user is currently interacting with. Clicking a link updates a different section of the page. Auto-complete fields or generated options not available to assistive technology. User has no idea how to find new or updated content Changes in focus prohibit complete review of the page Changes in focus cause disorientation and additional navigation.
Informing the User Explain the interaction to the user Before accessing the AJAX enabled page Within the AJAX enabled page Where possible, provide a manual update option Necessary for WCAG 2.0 Guideline 2.2 Save the users update preference
Make updates Noticeable Change the background color of updated data Use a subtle color Change only for a few seconds Best for small areas of the page Briefly blink the updated data Blink for 3 seconds or less (WCAG 2.0 Guideline 2.2) Avoid the flash threshold (WCAG 2.0 Guideline 2.3)
Help Users Find Updated Information Provide option for updates via an Alert Provide option to set focus to new data. Use HTML header tags to mark sections with updated content. Use DHTML Accessibility Alert role in conjunction with a floating pop-up box.  Use DHTML Accessibility Description role to describe new content.
DHTML Accessibility Techniques and AJAX DTHML Accessibility allows the creation of desktop style widgets on the web Full keyboard navigation without excessive use of the tab key Allows easy navigation from component to component and to updated content. Allows non-intrusive notification of updated content via Alert
DHTML Accessibility Overview Add keyboard event handling Add role and state information  Make items focusable via tabindex attribute Update state information dynamically
DHTML Accessibility Overview (continued) Works in HTML or XHTML XHTML Uses XHTML 1.x role attribute  Uses namespaces to add state attributes HTML Embeds role and state information into class attribute Accessibility Script library sets the role and state using DOM apis
Example using XHTML <html lang=&quot;en&quot; xml:lang=&quot;en&quot; xmlns=&quot;http://www.w3.org/TR/xhtml2&quot; xmlns:wairole=&quot;http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#&quot; xmlns:waistate=&quot;http://www.w3.org/2005/07/aaa&quot; >  .. <span id=&quot;slider&quot; class=&quot;myslider myselector2&quot; role=&quot;wairole:slider&quot; waistate:valuemin=&quot;0&quot; waistate:valuemax=&quot;50&quot; waistate:valuenow=&quot;33&quot; > </span>
Example Using HTML <!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;  &quot;http://www.w3.org/TR/html4/loose.dtd&quot; > <html lang=&quot;en&quot;> <head> <script type=&quot;text/javascript&quot; src=/slideshow/ajax-y-accesibilidad-presentation/795768/&quot;enable.js&quot;></script> </head> .. <span id=&quot;slider&quot; tabindex=&quot;0&quot;  class=&quot;myslider myselector2  axs   slider   valuemin-0   valuemax-50   valuenow-33 &quot; > </span>  Technique described at: http://www.w3.org/WAI/PF/adaptable/HTML4/embedding-20060318.html
Summary AJAX is a powerful technology for making dynamic web applications. AJAX applications can present Accessibility barriers. Simple changes to application design can make AJAX usable for all. DHTML Accessibility Techniques fit well with AJAX
Questions? Further Discussion in Marriott Executive Suite 1 (18 th  Floor) 3:30-4:00pm March 24 (today)
Sample Code for Changing Styles <style type=&quot;text/css&quot;> .notice { background-color:#FFFFCC; } .roInput { border:none; background-color:#FFFFFF; } </style> <script type=&quot;text/javascript&quot;> // get the element to hold updated data var priceLoc = document.getElementById('priceLoc&quot;); // update the data in price loc priceLoc.value = &quot;new data&quot;; // set the style so change will be noticed priceLoc.className = &quot;notice&quot;; // create timer to call clearActive() with element id and style name setTimeout(&quot;clearActive('priceLoc','roInput');&quot;, 5000);  function clearActive(activeId, resetStyle) { var curActive = document.getElementById(activeId); curActive.className = resetStyle; } </script>
Ad

Recommended

Advantages and disadvantages of an ajax based client application
Advantages and disadvantages of an ajax based client application
Placinta Alin
Ajax technology
Ajax technology
Safal Agrawal
Ajax workshop
Ajax workshop
WBUTTUTORIALS
Ajax basics
Ajax basics
Vel004
An Introduction to Ajax Programming
An Introduction to Ajax Programming
hchen1
Ajax.ppt
Ajax.ppt
MAGNA COLLEGE OF ENGINEERING
Building Cool apps with flex
Building Cool apps with flex
Joseph Khan
Ajax PPT
Ajax PPT
Hub4Tech.com
Introduction to ajax
Introduction to ajax
Raja V
Ajax Presentation
Ajax Presentation
jrdoane
Introduction to Adobe Flex - Zaloni
Introduction to Adobe Flex - Zaloni
Joseph Khan
Ajax
Ajax
Tech_MX
Architecture in Ajax Applications
Architecture in Ajax Applications
Alois Reitbauer
Ajax
Ajax
alexandru_cancel
Ajax presentation
Ajax presentation
Bharat_Kumawat
AJAX
AJAX
Mukesh Tekwani
Ajax Introduction Presentation
Ajax Introduction Presentation
thinkphp
Overview of AJAX
Overview of AJAX
Roshith S Pai
Ajax Presentation
Ajax Presentation
alaa.moustafa
Ajax
Ajax
sujaykumar
Ajax ppt - 32 slides
Ajax ppt - 32 slides
Smithss25
Web Application Introduction
Web Application Introduction
shaojung
Ajax Ppt
Ajax Ppt
Hema Prasanth
Ajax:From Desktop Applications towards Ajax Web Applications
Ajax:From Desktop Applications towards Ajax Web Applications
Siva Kumar
Project Feedloop
Project Feedloop
chrisiegers
Xhtml Part1
Xhtml Part1
nleesite
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applications
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applications
guestc75cdc
Performance anti patterns in ajax applications
Performance anti patterns in ajax applications
SergeyChernyshev
Making JavaScript Accessible
Making JavaScript Accessible
Dennis Lembree
Mike Davies - Ajax And Accessibility
Mike Davies - Ajax And Accessibility
Christian Heilmann

More Related Content

What's hot (20)

Introduction to ajax
Introduction to ajax
Raja V
Ajax Presentation
Ajax Presentation
jrdoane
Introduction to Adobe Flex - Zaloni
Introduction to Adobe Flex - Zaloni
Joseph Khan
Ajax
Ajax
Tech_MX
Architecture in Ajax Applications
Architecture in Ajax Applications
Alois Reitbauer
Ajax
Ajax
alexandru_cancel
Ajax presentation
Ajax presentation
Bharat_Kumawat
AJAX
AJAX
Mukesh Tekwani
Ajax Introduction Presentation
Ajax Introduction Presentation
thinkphp
Overview of AJAX
Overview of AJAX
Roshith S Pai
Ajax Presentation
Ajax Presentation
alaa.moustafa
Ajax
Ajax
sujaykumar
Ajax ppt - 32 slides
Ajax ppt - 32 slides
Smithss25
Web Application Introduction
Web Application Introduction
shaojung
Ajax Ppt
Ajax Ppt
Hema Prasanth
Ajax:From Desktop Applications towards Ajax Web Applications
Ajax:From Desktop Applications towards Ajax Web Applications
Siva Kumar
Project Feedloop
Project Feedloop
chrisiegers
Xhtml Part1
Xhtml Part1
nleesite
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applications
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applications
guestc75cdc
Performance anti patterns in ajax applications
Performance anti patterns in ajax applications
SergeyChernyshev
Introduction to ajax
Introduction to ajax
Raja V
Ajax Presentation
Ajax Presentation
jrdoane
Introduction to Adobe Flex - Zaloni
Introduction to Adobe Flex - Zaloni
Joseph Khan
Architecture in Ajax Applications
Architecture in Ajax Applications
Alois Reitbauer
Ajax Introduction Presentation
Ajax Introduction Presentation
thinkphp
Ajax Presentation
Ajax Presentation
alaa.moustafa
Ajax ppt - 32 slides
Ajax ppt - 32 slides
Smithss25
Web Application Introduction
Web Application Introduction
shaojung
Ajax:From Desktop Applications towards Ajax Web Applications
Ajax:From Desktop Applications towards Ajax Web Applications
Siva Kumar
Project Feedloop
Project Feedloop
chrisiegers
Xhtml Part1
Xhtml Part1
nleesite
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applications
TSSJS2010 Presenatation on: Performance Anti Patterns In Ajax Applications
guestc75cdc
Performance anti patterns in ajax applications
Performance anti patterns in ajax applications
SergeyChernyshev

Similar to Ajax Y Accesibilidad (20)

Making JavaScript Accessible
Making JavaScript Accessible
Dennis Lembree
Mike Davies - Ajax And Accessibility
Mike Davies - Ajax And Accessibility
Christian Heilmann
Using Ajax to improve your user experience at Web Directions South 2009
Using Ajax to improve your user experience at Web Directions South 2009
Peak Usability
Accessibility and JS: side-by-side
Accessibility and JS: side-by-side
Felipe de Albuquerque
Accessibility Geek Upv2
Accessibility Geek Upv2
philsmears
Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...
Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...
GreeceJS
Web Accessibility
Web Accessibility
Ramya Sethuraman
Open and Accessible UI
Open and Accessible UI
Mark Meeker
Web Accessibility in Drupal
Web Accessibility in Drupal
Promet Source
AJAX Introduction [Autosaved].pptx
AJAX Introduction [Autosaved].pptx
Jobin86
Accessibility by Andy Akhtar of SCET
Accessibility by Andy Akhtar of SCET
Hannah Rudman
Accessibility: introduction
Accessibility: introduction
Andres Baravalle
The road to professional web development
The road to professional web development
Christian Heilmann
Enabling an Accessible Web 2.0
Enabling an Accessible Web 2.0
bgibson
Accessibility Geek Up
Accessibility Geek Up
guest67b46c
Accessibility introduction
Accessibility introduction
Andres Baravalle
Seth Duffy Accessibility97035
Seth Duffy Accessibility97035
FNian
The Inclusive Web: hands-on with HTML5 and jQuery
The Inclusive Web: hands-on with HTML5 and jQuery
colinbdclark
A Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With Disabilities
Aayush Shrestha
Web Standards and Accessibility
Web Standards and Accessibility
Karl Dawson
Making JavaScript Accessible
Making JavaScript Accessible
Dennis Lembree
Mike Davies - Ajax And Accessibility
Mike Davies - Ajax And Accessibility
Christian Heilmann
Using Ajax to improve your user experience at Web Directions South 2009
Using Ajax to improve your user experience at Web Directions South 2009
Peak Usability
Accessibility and JS: side-by-side
Accessibility and JS: side-by-side
Felipe de Albuquerque
Accessibility Geek Upv2
Accessibility Geek Upv2
philsmears
Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...
Modern web development and accessibility (Christina Papadimitriou, Nadia Mark...
GreeceJS
Open and Accessible UI
Open and Accessible UI
Mark Meeker
Web Accessibility in Drupal
Web Accessibility in Drupal
Promet Source
AJAX Introduction [Autosaved].pptx
AJAX Introduction [Autosaved].pptx
Jobin86
Accessibility by Andy Akhtar of SCET
Accessibility by Andy Akhtar of SCET
Hannah Rudman
Accessibility: introduction
Accessibility: introduction
Andres Baravalle
The road to professional web development
The road to professional web development
Christian Heilmann
Enabling an Accessible Web 2.0
Enabling an Accessible Web 2.0
bgibson
Accessibility Geek Up
Accessibility Geek Up
guest67b46c
Accessibility introduction
Accessibility introduction
Andres Baravalle
Seth Duffy Accessibility97035
Seth Duffy Accessibility97035
FNian
The Inclusive Web: hands-on with HTML5 and jQuery
The Inclusive Web: hands-on with HTML5 and jQuery
colinbdclark
A Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With Disabilities
Aayush Shrestha
Web Standards and Accessibility
Web Standards and Accessibility
Karl Dawson
Ad

Ajax Y Accesibilidad

  • 1. JavaScript and AJAX Accessibility Becky Gibson Web Accessibility Architect
  • 2. Agenda What is AJAX and why do I care? What are the Issues with AJAX? How do I make my AJAX applications Accessible? Using HTML Techniques Using DHTML Accessibility Techniques Demonstration of techniques Summary
  • 3. What is AJAX? AJAX = Asynchronous JavaScript and XML Allows incremental update of Web pages. Built using standard web technologies - HTTP, (X)HTML, CSS, JavaScript, Document Object Model (DOM), XML Used by many popular internet companies. Examples: Google Suggests, Google & Yahoo! Maps Amazon A9 Search Flickr, BaseCamp, Kayak Yahoo! AJAX Library
  • 4. Example Yahoo! Sports
  • 5. Traditional Web Interaction Client makes http request Web server Server returns a new page
  • 6. How AJAX works Web server Client makes http request for specific information Server returns the requested information Multiple requests are served
  • 7. Why Do I Care About AJAX? Enables building Rich Internet Applications (RIA) Allows dynamic interaction on the Web Improves performance Real-time updates No plug-ins required
  • 8. What are the Issues with AJAX? User does not know updates will occur. User does not notice an update. User can not find the updated information. Unexpected changes in focus. Loss of Back button functionality*. URIs can not be bookmarked*. *These issues will not be discussed as they are not specific to accessibility.
  • 9. Specific Accessibility Issues Assistive Technology users are not aware of updates Updates occur on a different section of the page than the user is currently interacting with. Clicking a link updates a different section of the page. Auto-complete fields or generated options not available to assistive technology. User has no idea how to find new or updated content Changes in focus prohibit complete review of the page Changes in focus cause disorientation and additional navigation.
  • 10. Informing the User Explain the interaction to the user Before accessing the AJAX enabled page Within the AJAX enabled page Where possible, provide a manual update option Necessary for WCAG 2.0 Guideline 2.2 Save the users update preference
  • 11. Make updates Noticeable Change the background color of updated data Use a subtle color Change only for a few seconds Best for small areas of the page Briefly blink the updated data Blink for 3 seconds or less (WCAG 2.0 Guideline 2.2) Avoid the flash threshold (WCAG 2.0 Guideline 2.3)
  • 12. Help Users Find Updated Information Provide option for updates via an Alert Provide option to set focus to new data. Use HTML header tags to mark sections with updated content. Use DHTML Accessibility Alert role in conjunction with a floating pop-up box. Use DHTML Accessibility Description role to describe new content.
  • 13. DHTML Accessibility Techniques and AJAX DTHML Accessibility allows the creation of desktop style widgets on the web Full keyboard navigation without excessive use of the tab key Allows easy navigation from component to component and to updated content. Allows non-intrusive notification of updated content via Alert
  • 14. DHTML Accessibility Overview Add keyboard event handling Add role and state information Make items focusable via tabindex attribute Update state information dynamically
  • 15. DHTML Accessibility Overview (continued) Works in HTML or XHTML XHTML Uses XHTML 1.x role attribute Uses namespaces to add state attributes HTML Embeds role and state information into class attribute Accessibility Script library sets the role and state using DOM apis
  • 16. Example using XHTML <html lang=&quot;en&quot; xml:lang=&quot;en&quot; xmlns=&quot;http://www.w3.org/TR/xhtml2&quot; xmlns:wairole=&quot;http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#&quot; xmlns:waistate=&quot;http://www.w3.org/2005/07/aaa&quot; > .. <span id=&quot;slider&quot; class=&quot;myslider myselector2&quot; role=&quot;wairole:slider&quot; waistate:valuemin=&quot;0&quot; waistate:valuemax=&quot;50&quot; waistate:valuenow=&quot;33&quot; > </span>
  • 17. Example Using HTML <!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot; > <html lang=&quot;en&quot;> <head> <script type=&quot;text/javascript&quot; src=/slideshow/ajax-y-accesibilidad-presentation/795768/&quot;enable.js&quot;></script> </head> .. <span id=&quot;slider&quot; tabindex=&quot;0&quot; class=&quot;myslider myselector2 axs slider valuemin-0 valuemax-50 valuenow-33 &quot; > </span> Technique described at: http://www.w3.org/WAI/PF/adaptable/HTML4/embedding-20060318.html
  • 18. Summary AJAX is a powerful technology for making dynamic web applications. AJAX applications can present Accessibility barriers. Simple changes to application design can make AJAX usable for all. DHTML Accessibility Techniques fit well with AJAX
  • 19. Questions? Further Discussion in Marriott Executive Suite 1 (18 th Floor) 3:30-4:00pm March 24 (today)
  • 20. Sample Code for Changing Styles <style type=&quot;text/css&quot;> .notice { background-color:#FFFFCC; } .roInput { border:none; background-color:#FFFFFF; } </style> <script type=&quot;text/javascript&quot;> // get the element to hold updated data var priceLoc = document.getElementById('priceLoc&quot;); // update the data in price loc priceLoc.value = &quot;new data&quot;; // set the style so change will be noticed priceLoc.className = &quot;notice&quot;; // create timer to call clearActive() with element id and style name setTimeout(&quot;clearActive('priceLoc','roInput');&quot;, 5000); function clearActive(activeId, resetStyle) { var curActive = document.getElementById(activeId); curActive.className = resetStyle; } </script>