- From: Charles McCathieNevile <charles@w3.org>
- Date: Tue, 7 Nov 2000 07:15:12 -0500 (EST)
- To: David Holstius <holstius@msu.edu>
- cc: "Bailey, Bruce" <Bruce_Bailey@ed.gov>, w3c-wai-ig@w3.org
Well,
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.
Cheers
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 +
'</a>';
document.write(s);
}
Combine it with a Help() function that you define, and then code your actual
HTML like:
<script type="text/javascript">WritePopupHelp('foobar.htm', 'Definition of
foobar')</script>
<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 pairs,
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
holstius@msu.edu
> 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 the
> normal browsing controls -- so it doesn't really look so much a web page.
>
> 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 it
> down (it's fairly well hidden). Lynx just generates a message: "Alert!:
> Unsupported URL scheme!" and nothing happens.
>
> Is there an alternative way to code this so that 4x browsers still get the
> no-frills pop-up version, but Lynx (and other JavaScript-free) users get
the
> regular URL for the help text?
--
Charles McCathieNevile mailto:charles@w3.org phone: +61 (0) 409 134 136
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, France
Received on Tuesday, 7 November 2000 07:15:15 UTC