Difference between revisions of "Web Accessibility:Scripting"
Line 4: | Line 4: | ||
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. | 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). | + | Accessible JavaScripts expose the content to screen readers and makes all activities device independent (performed using keyboard). |
+ | |||
+ | '''Below you will find a list of recommended best practices that will make your web pages more accessible:''' | ||
---- | ---- |
Latest revision as of 10:47, 19 December 2006
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).
Below you will find a list of recommended best practices that will make your web pages more accessible:
- 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