W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > January to March 2001

checklink and javascript: URI scheme (was Re: Code: 501 Protocol scheme 'javascript' is not supported) (fwd)

From: Charles McCathieNevile <charles@w3.org>
Date: Tue, 27 Mar 2001 17:28:06 -0500 (EST)
To: WAI GL <w3c-wai-gl@w3.org>
Message-ID: <Pine.LNX.4.30.0103271719580.22781-100000@tux.w3.org>
The following message reminded me to look. The techniques for scripting
should point out that using href="javascript:something()" is a bad move, and
that instead there should be activation events trapped, with the possiblity
of providing a server-side or link-based equivalent of the same thing.

Proposed additions to techniques:
for example:
<a href="javascript:window_open('some.uri')">

should be changed to

<a href="some.uri" target="_new">


<a href="javascript:doSomethingFancy()">

should be

<form method="post" action="http://example.org/doSomethingFancy.jsp">
<input type="submit" value="whatever" onsubmit="doSomethingFancy()">

---------- Forwarded message ----------
Date: Tue, 27 Mar 2001 08:11:04 -0500
From: Hugo Haas <hugo@w3.org>
To: www-validator@w3.org
Cc: shannonb@xilinx.com, w3c-wai-er-ig@w3.org
Subject: checklink and javascript: URI scheme (was Re: Code: 501 Protocol
    scheme 'javascript' is not supported)
Resent-Date: Tue, 27 Mar 2001 08:11:23 -0500 (EST)
Resent-From: w3c-wai-er-ig@w3.org

[ I am copying the WAI Evaluation, Repair, and Transform Tools
  Working Group[8] mailing list for info. ]

* Hugo Haas <hugo@w3.org> [2001-03-26 18:25-0500]
> The link checker does not support the javascript: scheme[1].
> Also, note that the Web Content Accessibility Guidelines[2] using
> "javascript:" links[3] makes your document not accessible; this is a
> priority[4] 1 checkpoint:
>    [Priority 1]
>           A Web content developer must satisfy this checkpoint.
>           Otherwise, one or more groups will find it impossible to access
>           information in the document. Satisfying this checkpoint is a
>           basic requirement for some groups to be able to use Web
>           documents.

The link checker[5] now informs users that they must change a
'javascript:' link, referencing the Web Content Accessibility
Guidelines 1.0[2] and the Techniques for Web Content Accessibility
Guidelines 1.0[6].

See [7] for an example.

  1. http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm
  2. http://www.w3.org/TR/1999/WAI-WEBCONTENT-19990505/
  3. http://www.w3.org/TR/1999/WAI-WEBCONTENT-19990505/#tech-scripts
  4. http://www.w3.org/TR/1999/WAI-WEBCONTENT-19990505/#priorities
  5. http://validator.w3.org/checklink
  6. http://www.w3.org/TR/WCAG10-TECHS/
  7. http://validator.w3.org/checklink?uri=http%3A%2F%2Fwww.w3.org%2F2001%2F03%2Fjavascript-link-test.html&depth=&submit=Check
  8. http://www.w3.org/WAI/ER/IG/
Hugo Haas - W3C
mailto:hugo@w3.org - http://www.w3.org/People/Hugo/ - tel:+1-617-452-2092
Received on Tuesday, 27 March 2001 17:28:07 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 16 January 2018 15:33:36 UTC