Re: Scripting Techniques first draft

On Sun, 12 Sep 2004 18:36:43 -0700, Matt May <mcmay@bestkungfu.com> wrote:
> 
> I have published a first draft of the Scripting Techniques for WCAG 2.0:
> 
> http://www.w3.org/WAI/GL/WCAG20/WD-WCAG20-SCRIPT-TECHS-20040910/

1.1 - the correct example is not correct...  This highlights the main
problem of a script techniques document, you cannot make the examples
useful without being too complicated for anyone to understand.  (also
javascript form uri's are simply hardly used anywhere anyway, until
the WHAT-WG guys "standardise" them)

The problem with the example though is if that submitmyform() fails to
manage to do whatever it was going to do - because of DOM limitations
etc. then the form isn't submitted, so the page is not accessible,
just a little more accessibile.

The 1.3 example is simply wrong (and dangerously so) it's wrong in the
sense that you shouldn't return false in an onsubmit and then call
submit(), you're risking an endless loop (whilst slightly
under-specified the submit function is not defined to explicitly not
call the submit event) but more importantly the idea that you can use
such a field to announce client-side validation has taken place is
simply wrong!  You MUST validate on the server if validation matters
(consider a bank that only validates you have permission to move money
from one account to another on the client, but uses this case!)

2.1 has similar return false problems (especially bad with
window.open, as popup blockers generally silently fail so the window
wouldn't open.)

This is an appropriate example:
<a href="popupPage.html" target="windowName" onclick="window.open('',
this.target, '...');">Link text</a>

Cheers,

 Jim.

Received on Monday, 13 September 2004 02:21:16 UTC