|
Accessible Javascript ResourcesWhat is Javascript[from: WebAIM.org Creating Accessible Javascript] This may best be answered by defining what JavaScript is NOT. First, it is not HTML. JavaScript does not use HTML tags or abide by any of the general rules of HTML. You can, however, use JavaScript with HTML on a webpage. Second, JavaScript is not Java. Although JavaScript is often called Java, the two are not the same. Java was developed by Sun Microsystems and is a stand-alone programming language. JavaScript, on the other hand, was developed by Netscape Corporation. Although similar to Java in syntax, JavaScript is not a stand-alone language; in order for JavaScript to work, it must be part of a web page that is being displayed in a browser that understands the JavaScript language. Sun's Java programming language can be implemented in webpages as a built in program, whereas JavaScript scripts are reliant upon the client (visitor's) computer in order for them to work. Once again, JavaScript is not HTML or a version of HTML. It is a distinct, separate scripting language. HTML is read and processed by the web browser. When the browser reads JavaScript code within your HTML document, it processes the code, then displays any output within the Web page. The computer reading the JavaScript must have a JavaScript interpreter, a program that interprets the script and runs it, and that interpreter must be enabled. HTML, alone, creates very static pages. There is little user interaction and little by the way of dynamic content within a particular page. HTML cannot think; it does not have the capabilities to perform mathematics, store variables, or dynamically display content. JavaScript allows your Web page to 'think'. Although many server-side scripting programs (such as PHP, JPS, ASP, or ColdFusion) have the ability to perform such functions, JavaScript can perform these functions within the client Web browser. Because JavaScript is a scripting language, it allows developers to implement small applications into their pages. These programs may do things as simple as changing a graphic when the mouse rolls over it to something as complex as performing advanced mathematical formulas on user input. Articles & Discussion:Accessible "Jump Menus" (from the WAC): Discussion of options for adding a "Go" button to lists and menus. One option uses JavaScript; another uses ColdFusion. IBM Developer Guidelines (from the IBM Accessibility Center): "Some of the functionality provided by scripts can be considered non-essential to the operation of the application and can help usability or, at least, not negatively affect accessibility. For example, JavaScript mouse-overs used for visual effects, such as highlighting or changing the background color, are not an issue for accessibility for the blind and might improve usability for the learning impaired." Javascript Accessibility Issues (from the Trace Center at University of Wisconsin-Madison): "JavaScript is a scripting language used to make HTML documents more dynamic. Oftentimes, user actions trigger scripts which modify the page. Users may not realize a page has changed or may not be ready for the page to change when it does. On the other hand, if done well, JavaScript can enhance the accessibility of pages by allowing users to customize them to their needs." Javascript and Accessibility (from SNOW at the University of Toronto): "Use of scripts such as Javascript may create barriers to access for some users of adaptive technology. For example, if a script generates content on the "mouseover" event handler, as in the case of "rollovers," anyone who relies on keyboard access will not be able create the event that will cause the browser to generate the text. In addition, screen readers will often read the content of the script itself in a meaningless jumble of numbers and letters. Although this jumble is text, it cannot be interpreted or used. On the other hand, Javascript components that do not generate content dynamically are generally not problematic for users of adaptive technology. Examples would include confirmation of entry of form fields, browser version identification, etc." How do scripting languages affect accessibility? (from AccessIT): "Scripting languages are becoming increasingly popular on the web, because they can be used to make web pages more dynamic and interactive. There are two types of scripting languages: server-side and client-side. Server-side scripting performs all of its processing on the web server and delivers a final product (the web page) to the user's browser. Server-side scripting does not, in and of itself, present accessibility problems. Like all web content, however, server-side scripts must produce content that follows principles of accessible design." "Unobtrusive Javascript" (from OnlineTools.org): " Javascript is a wonderful tool to enhance the usability of web sites. It is the extra layer above the mark-up 'what is this text' and the CSS 'how should it be displayed'. Javascript adds a new dimension, the "how should this element behave. [. . . ] see how we can use Javascript, but still maintain accessibility. The technique to completely separate Javascript from the other two layers of web development has become commonly named 'unobtrusive Javascript', as 'accessible Javascript' does not quite cut it. You can have a perfectly separated Javascript and still be totally inaccessible."
|
OSU Web Accessibility Center (WAC)
1760
Neil Ave
150
Pomerene Hall
Columbus,
Ohio
43210
Phone: (614) 292-1760
Fax: (614) 292-4190
E-mail: webaccess@osu.edu
For questions or problems with this site, including incompatibility with assistive technology,
email the WAC Webmaster.