RE: javascript scheme in href URLs

Dave J Woolley (DJW@bts.co.uk) wrote:
> Preferably, if you are going to use Javascript and it isn't
> fundamentally++ required for the applications (true of most
> commercial web sites using javascript:) your links should be
> normal links and any Javascript effects should be achieved by
> intercepting the onclick or onsubmit events, such that, with
> the Javascript inactive, the page is still completely usable.
> That's my view, anyway.

It's also the view of the W3C Accessibility WG.

The Web Content Accessibility Guidelines 1.0
http://www.w3.org/TR/1999/WAI-WEBCONTENT-19990505

This is a W3C Recommendation; it says:
] 6.3 Ensure that pages are usable when scripts, applets, or
] other programmatic objects are turned off or not supported.
] If this is not possible, provide equivalent information on an
] alternative accessible page. [Priority 1]

The document goes on to say, "...(e.g., do not use 'javascript:'
as the link target)."

Note that this is a Priority 1 checkpoint.  If you use "javascript:",
some people won't be able to use that part of your site.

-- 
Jason Orendorff

Received on Tuesday, 8 February 2000 16:28:58 UTC