W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > October to December 2000

RE: How do I make JavaScript "pop-up help" accessible?

From: Reidy Brown <rbrown@blackboard.com>
Date: Tue, 7 Nov 2000 09:23:14 -0500
Message-ID: <FB48B8939127D411B07700B0D04903325315A4@bbmail1.blackboard.net>
To: w3c-wai-ig@w3.org
Actually, unless there is a default base target set for the page, it looks
like the non-javascript version opens up in the original window. This makes
it a "two for the price of one" accessibility fix: if you're not using
javascript, you get the information in the original window.

<noscript><a href="foobar.htm">Definition of foobar</a></noscript>

Reidy Brown 
Accessibility Coordinator
Blackboard, Inc. 
1899 L. St., NW, 5th Floor 
Washington, DC 20036 
(202) 463-4860 x236 

-----Original Message-----
From: Charles McCathieNevile [mailto:charles@w3.org]
Sent: Tuesday, November 07, 2000 7:15 AM
To: David Holstius
Cc: Bailey, Bruce; w3c-wai-ig@w3.org
Subject: Re: How do I make JavaScript "pop-up help" accessible?


it provides a pop-up window, which goes against WCAG 1.0 checkpoint 10.1
(Priority 2) that says not to do that. But it does work for non-javascript
browsing, which is important.


Charles McCN

On Mon, 6 Nov 2000, David Holstius wrote:

  Something that I've done in the past is to make a Javascript function that
  writes Javascript code into the document. I don't know how "official" this
  is, but it seems to work. Something like:
  function WritePopupHelp( helpFile, linkText ) {
      var s = '<a href="javascript:Help(\'' + helpFile + '\')">' + linkText
  Combine it with a Help() function that you define, and then code your
  HTML like:
  <script type="text/javascript">WritePopupHelp('foobar.htm', 'Definition of
  <noscript><a href="foobar.htm">Definition of foobar</a></noscript>
  That way, only users with JS enabled will get source that invokes JS.
  It becomes a little redundant to hand-code all those script/noscript
  so if you have the luxury of server-side processing you can wrap the
  generation of each script/noscript pair in a server-side function. (You
  wouldn't want to put it in another Javascript because then folks w/out JS
  wouldn't get *anything*.)
  I'd like to know what WAI-IG members think of this workaround.
  David Holstius
  > On Monday, November 06, 2000 2:19 PM, Bruce Bailey wrote:
  > I site I am reviewing generates context-sensitive "pop-up" help using
  > JavaScript.  I imagine they are doing this for the effect that:
  > (1) The main window stays open;
  > (2) The new pop-up window is smaller than full-screen and has none of
  > normal browsing controls -- so it doesn't really look so much a web
  > The pop-up is invoked by code like:
  > <A href="JavaScript:Help('foobar.htm')">definition of FooBar</A>
  > Obviously, the HTML file is available if one can figure out how to hunt
  > down (it's fairly well hidden).  Lynx just generates a message:
  > Unsupported URL scheme!" and nothing happens.
  > Is there an alternative way to code this so that 4x browsers still get
  > no-frills pop-up version, but Lynx (and other JavaScript-free) users get
  > regular URL for the help text?

Charles McCathieNevile    mailto:charles@w3.org    phone: +61 (0) 409 134
W3C Web Accessibility Initiative                      http://www.w3.org/WAI
Location: I-cubed, 110 Victoria Street, Carlton VIC 3053, Australia
September - November 2000: 
W3C INRIA, 2004 Route des Lucioles, BP 93, 06902 Sophia Antipolis Cedex,
Received on Tuesday, 7 November 2000 09:30:09 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:10 UTC