Web Accessibility:Scripting

From WolfTech
Revision as of 11:46, 19 December 2006 by Ebndelo (talk | contribs)
Jump to navigation Jump to search

JavaScript is the most commonly used scripting language to create HTML documents that are more dynamic, functional and interactive. When used programmatically, scripts can detect user agents, increase user interaction, control web content and other processes to enhance the functionality and accessibility of a web page.

While scripting can be used to enhance functionality of web pages, they can also make the pages inaccessible. When designing web pages using scripts ensure the JavaScript is directly accessible or provide an accessible, non-JavaScript alternative.

Accessible JavaScripts expose the content to screen readers and makes all activities device independent (performed using keyboard).


  • Avoid DHTML menus, if used provide a method to switch to alternative menu formats
  • Use device-independent event triggers like "onFocus", "onBlur" and "onSelect" rather than user interaction-level triggers like "onmousedown" or "onclick"
  • Provide controls to pause, stop or restart timed event
  • Provide alternative content using <NOSCRIPT></NOSCRIPT> tag for when scripting is turned off

Resources

[1] IBM Web Accessibility Scripts

[2] WEBAIM- Accessibile JavaScripts

[3] Online Tools- Unobtrusive JavaScripting

[4] Brothercake- Accessible DHTML Menus

[5] Quirksmode-JavaScript Tutorial