Web Development
Web Developer Guidelines
Visual Design Recommendations

Checkpoint 1.3 - JavaScript

The page does not contain JavaScript links

WCAG 1.0 Priority 1

WCAG Guideline 6. Ensure that pages featuring new technologies transform gracefully.

The power of the internet lies in the ability to connect web pages with each other via hyperlinks. This is directly enabled using the HTML anchor element that points to the target page.

It is also possible to create a hyperlinking capability utilizing the JavaScript pseudo-protocol javascript:. This causes many problems for users, such as when JavaScript is turned off by the user. Search engines, such as Google, do not execute this JavaScript when indexing web pages so links created using javascript: will not be followed for indexing. Some screen readers and text-only browsers will also not be able to execute this JavaScript.

Requirement

The web page must not contain hyperlinks that are created using JavaScript.

Recommendation

Do not include javascript: in the href attribute of the anchor <a> element. Instead the target of the link should be the only content of the href attribute.

Checking Tool

View the source code of the web page and associated JavaScript files to locate any instances of javascript:.

  • Internet Explorer - AIS toolbar: Source > View Source
  • Firefox - Web Developer's Toolbar: View Source > View Source

Information Source

The original source of this information is located on the W3C web site  (www.w3.org/TR/WCAG10-TECHS/#tech-scripts)

 

Back to top