W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > July to September 2005

Re: Challenges on JavaScript Techniques

From: Peter-Paul Koch <pp.koch@gmail.com>
Date: Mon, 11 Jul 2005 19:24:52 +0200
Message-ID: <21e4a1280507111024770f7659@mail.gmail.com>
To: w3c-wai-gl@w3.org

> > > Take PPK up on his offer.
> >
> > For what it's worth: Definitely agreed.
> 
> For me it's ok ;)

Thanks for the confidence. Please note that this is not my
highest-priority project at the moment, so it may take a week or so
before I can actually show something.

A few questions and remarks:

***

I assume that the target audience of the document is web developers.
If I'm wrong, please correct me.

***

If the document is targeted at web developers, I'd like to use a few
best practices, like separation of behaviour and structure, that,
while not themselves required for accessibility, nonetheless will make
sure that the document fits into current web development discussions.

Objections?

Separation of behaviour and structure means

WRONG: <form action="somewhere.php" onsumbit="return validate()">

RIGHT: <form action="somewhere.php" id="validate">

window.onload = function () {
   document.getElementById('validate').onsubmit = validate;
}


***

2.2 Dynamic content generation

"Assistive technologies such as screen readers rely on the Document
Object Model (DOM) to interpret the semantics in HTML for a different
modality. Given this, the document.write() and innerHTML() methods can
render content invalid (and inaccessible via DOM) after the fact."

The real problem is that browsers will attempt to construct a valid
DOM, but will arrive at different structures.

I'm also not sure if innerHTML should be deprecated per se; especially
when generating large blocks of content it's faster than W3C DOM
methods (see http://www.quirksmode.org/dom/innerhtml.html benchmark
tests).

***

2.4 Device-independent events

This of course belongs in the document, though maybe not under the
Links header, but we'll need quite a bit of research before being able
to recommend proper event pairs (click/keypress etc.). The current
example is incorrect: onactivate is supported only by Explorer (Win
and Mac).

***

2.6 Dynamic HTML menus

I've got a perfect example for this point, though I have to rewrite
it, and it may become quite large, since it needs carefully
orchestrated XHTML, CSS, and JavaScript to get the point across.

Am I allowed to create separate documents with large code examples?

***

New point: Inserting asynchronously loaded content (AJAX). Am I
allowed to add points to the document? I expect to think of some more
points when I'm working on the document.

-- 
-------------------------------------------------------------------
ppk, freelance web developer
http://www.quirksmode.org/
------------------------------------------------------------------
Received on Monday, 11 July 2005 17:24:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:47:39 GMT