W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > July to September 2004

[#1059] Prohibit URLs with javascript protocol

From: Michael Cooper <michaelc@watchfire.com>
Date: Tue, 21 Sep 2004 15:36:12 -0400
Message-ID: <A0666B3C59F1634290FDC88674D87C329F71EF@1WFEMAIL.ottawa.watchfire.com>
To: "WAI GL \(E-mail\)" <w3c-wai-gl@w3.org>

The following is a proposal for HTML techniques. I will implement the proposal in a draft unless there is objection from the group. There will still be room for debate of the proposal in the context of the next draft.

Links that use the Javascript protocol, e.g., 

  <a href="javascript:dosomething();">Javascript link</a>

are unusable by browsers that do not support javascript.

There should be a technique that advises authors not to use javascript links. Instead, they should provide an http link to a fallback page, and instantiate the desired script using event handlers. For example:

  <a href="fallback.html" onactivate="dosomething()">Good link</a>

NOTE: this proposed technique is based on the assumption that the failure of client side scripting to operate is an accessibility issue. The WCAG WG is in discussion on this point. If the outcome of that discussion is that script alternatives are not needed simply to provide for non-scripting clients, this technique would be removed or marked as optional. However, for now we should place it in the document, to act as a placeholder and possibly to be part of the context for the above discussion.

--- Signature ---

Michael Cooper
Accessibility Product Manager, Watchfire
1 Hines Rd Suite 200, Kanata, ON  K2K 3C7  Canada
Tel: +1 (613) 599-3888 x4019
Fax: +1 (613) 599-4661
Email: michaelc@watchfire.com
Web: http://www.watchfire.com/
Received on Tuesday, 21 September 2004 19:36:10 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:17:58 UTC