Web Guide  > webguide > 6. Construction > 6.2 HTML and coding > 6.2d JavaScript

6.2d JavaScript

It is the most popular scripting language on the Web and is found in around 60% of all Web sites. JavaScript widgets and AJAX (Asynchronous JavaScript And XML) provide dynamic aspects to Web pages and make them interactive.

JavaScript works in all major browsers.

What can a JavaScript do?

  • JavaScript gives HTML designers a programming tool, without being a programmer;
  • JavaScript can put dynamic text into an HTML page;
  • JavaScript can react to events - it can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element;
  • JavaScript can read and change the content of an HTML element
  • JavaScript can be used to validate data, e.g. a form before it is submitted to a server.

JavaScript and ARIA

JavaScript has a dramatic effect on the ability of people with disabilities to access Web content as (X)HTML cannot provide sufficient accessibility support for dynamic content, resulting in a semantic gap between what is seen on the page and what is seen by screen readers.

Web Content Accessibility Guidelines (WCAG) 2.0 allows JavaScript so long as the script is accessible. Accessible Rich Internet Applications (ARIA) markup can be added to address the accessibility of dynamic Web content for people with disabilities.

It improves the accessibility of script heavy Web sites and Web applications for assistive technology users without extensive modification to existing libraries of Web resources.

An overview of ARIA is provided WAI-ARIA Primer.