- From: Charles McCathieNevile <charles@w3.org>
- Date: Fri, 12 Jan 2001 05:28:21 -0500 (EST)
- To: Marjolein Katsma <mkatsma@allaire.com>
- cc: WAI AU Guidelines <w3c-wai-au@w3.org>, WAI ER group <w3c-wai-er-ig@w3.org>
Yes, it is true that the best way to do the test is to have a complete (more or less) Javascript parser. But then that isn't such a big deal - there are a number of them around, and even implemented in relevant software. Otherwise, it would make sense to do the checking on methods, with a bit of work to determine where they are applied. The discussion in the ER group about serilaising languages into BNF and then XML to be able to apply RDF in the form of EARL (Evaluation and Repair description Language) to it is relevant to this approach. Anyway, I figure it makes some more useful information to expand the technique... cheers Charles McCN On Fri, 12 Jan 2001, Marjolein Katsma wrote: This sounds like a great idea to me - but it may be pretty hard to implement. Consider the following: - What is the relationship of the (Java)Script to the displayed document? Possibilities are: 1) it is embedded in the document 2) it is generated along with the document 3) it is linked to the document 4) it generates a document all by itself (yuck - but I've seen it done) For a linked script one uses syntax like: <script type="text/javascript" src="Scripts/popupWindow.js"></script> Note that the src attribute may contain either a relative or an absolute reference (do we open it from the Internet to check it?) - Variable names. Two examples: 1) A window to be opened could be named, but does not need to be; the statement becomes like: window.open( pageToLoad,winName,args ); Do we parse the whole document to find assignments before interpreting such statements? 2) To make the window available to give focus to, syntax like the following is used: popup = window.open( pageToLoad,winName,args ); popup.focus(); - Methods only? Instead of parsing and interpreting variable names you might try to look for methods only ( .open() , .focus() , etc.) but this is tricky, too: different objects could share the same method names. Essentially, then, to be able to apply any of this reasonably reliably one would need to implement an almost complete (Java)Script parser. I still like the idea ... <grin/> Cheers, Marjolein > -----Original Message----- > From: Charles McCathieNevile [SMTP:charles@w3.org] > Sent: Friday, January 12, 2001 03:09 > To: WAI AU Guidelines; WAI ER group > Subject: ACTION ITEM: Things that can be recognized in scripting > language for vieport control (fwd) > > This came from Jon Gunderson, but I think it is extremely helpful > information > to add to AERT 10.1.2 - a technique for ATAG 4.1, listed in Jan's November > draft available from the sources area. > > -- [MK] [snip] > ---------- Forwarded message ---------- > Date: Wed, 10 Jan 2001 20:03:58 -0600 > From: Jon Gunderson <jongund@uiuc.edu> > To: w3c-wai-ua@w3.org > Subject: ACTION ITEM: Things that can be recognized in scripting > language > for vieport control > Resent-Date: Wed, 10 Jan 2001 21:02:22 -0500 (EST) > Resent-From: w3c-wai-ua@w3.org > > There are seven main types of information that I think a user agent could > recognize in scripts that are associated with our checkpoints related to > control of viewports, focus, styling effects and form submission. > Examples > for JavaScript are provided. [MK] (examples removed) > 1. Opening a new window > 2. Closing a window > 3. Changing focus to another window > 4. Changing the URI rendered in the current view port > 5. Submitting forms: > 6. Controlling the start and speed of scrolling for a MARQUEE element > 7. Changes in style of an element: > [MK] [snip] -- 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 until 6 January 2001 at: W3C INRIA, 2004 Route des Lucioles, BP 93, 06902 Sophia Antipolis Cedex, France
Received on Friday, 12 January 2001 05:28:23 UTC