- From: Thanasis Kinias <tkinias@asu.edu>
- Date: Mon, 26 Mar 2001 16:38:38 -0700
- To: "'shannonb@xilinx.com'" <shannonb@xilinx.com>
- Cc: www-validator@w3.org
- Message-id: <A021872EC2BDD411AB3600902746A055016047F7@mainex4.asu.edu>
Shannon Bristow wrote: > I am getting an error message on links to javascript. To include > javascript in a page, such as opening a new window, is relatively > common. Is this really not supported or am I doing something wrong? Many people would consider using javascript: hrefs "doing something wrong." AFAIK, the HTML specifications do not address what protocols are allowable as the content of hrefs. However, I'm not sure that these are valid URLs -- from RFC2396 [1]: > The term "Uniform Resource Locator" (URL) refers to the subset of URI > that identify resources via a representation of their primary access > mechanism (e.g., their network "location") Using javascript: as a "protocol" isn't addressing a resource, really; it's frequently addressing an action to be taken. That's not what a URL is supposed to be. The more important question if you're using javascript: hrefs, rather than whether they're "legitimate" URIs, is whether they are accessible to your target audience, and (if you are in the United States, Australia, or other country with anti-discrimination laws regarding the handicapped) whether they have the effect of discrimitating against handicapped users, putting you afoul of the law. The Web Content Accessibility Guidelines [2], guideline 6, checkpoint 6.3 gives: > 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] Unless you provide alternate, non-javascript links (via http:// URLs, typically), your pages are inaccessible to those unable to use javascript, which includes most blind users with aural browsers, or anyone else using older software. Opening new windows also violates checkpoint 10.1 [3]: > Until user agents allow users to turn off spawned windows, > do not cause pop-ups or other windows to appear and do not > change the current window without informing the user. [Priority 2] On the Web, just because it's common practice, doesn't mean it's "right" in technical or ethical terms; it also doesn't mean it's legal. -- [1] <http://www.ietf.org/rfc/rfc2396.txt> [2] <http://www.w3.org/TR/WCAG/#gl-new-technologies> [3] <http://www.w3.org/TR/WCAG/#gl-interim-accessibility> Thanasis Kinias Information Dissemination Team, Information Technology Arizona State University Tempe, Ariz., U.S.A. Qui nos rodunt confundantur et cum iustis non scribantur.
Received on Monday, 26 March 2001 18:47:15 UTC