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

RE: [#1059] Prohibit URLs with javascript protocol

From: Michael Cooper <michaelc@watchfire.com>
Date: Mon, 27 Sep 2004 15:32:43 -0400
Message-ID: <A0666B3C59F1634290FDC88674D87C329F722B@1WFEMAIL.ottawa.watchfire.com>
To: "WAI GL \(E-mail\)" <w3c-wai-gl@w3.org>

I received a clarification off list about the example in this technique. I was hasty and did not check that the "onactivate" event handler is in spec or properly supported. Examples for this technique should use "onclick" and be sure to demonstrate return false to override the default action.

I would like to go ahead and throw this technique into the draft. In addition to the clarification about the event handlers, there has been both agreement and objection to the requirement that all JavaScript must have fallbacks provided in HTML. This is related to an issue that is active debate in the Working Group right now. The technique should acknowledge that debate in an editorial note. However, if the debate is resolved in favour of requiring the fallbacks, we will need this technique anyway so I think we might as well see what it would look like now. I also think that the presence of this technique in the draft will elicit reactions from people on both sides of the debate, and so it may serve has a handle to help clarify issues. If the debate resolution is not to require fallbacks, we can remove the technique at that time.

Michael

> -----Original Message-----
> From: w3c-wai-gl-request@w3.org [mailto:w3c-wai-gl-request@w3.org]On
> Behalf Of Michael Cooper
> Sent: Tuesday, September 21, 2004 3:36 PM
> To: WAI GL (E-mail)
> Subject: [#1059] Prohibit URLs with javascript protocol
> 
> 
> 
> 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 Monday, 27 September 2004 19:32:46 UTC

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