Re: JavaScript and Screen Readers

On Mon, Aug 18, 2008 at 7:57 AM, David Dorward <david@dorward.me.uk> wrote:
>
>
> On 18 Aug 2008, at 15:53, Ryan Jean wrote:
>
>> How often do you use "document.write()"?
>
>
> Not since about 2000, it isn't compatible with a proper separation of
> program logic from content.
>

oh, that's silly, you just don't know how to use it along with proper
separation, ya frakkin' naysayer! ;)

It's nothing to hit a url with an XMLHttpRequest which return an html snippet.

That said, document.write() is also odd because it appends, yah?  So..
it would be wierd for people who *can* see.

Far more sensible and common for me to do is to getElementById and
replace or append to the contents.

Also, "program logic from content" is very old school.  Howabout
Model-View-Controller with Controller in JS?  In this way, many
snippets or "view components" may make up an entire ui whereby only
one bit may change.  This would be a challenge for a screen reader,
I'd think, because you'd have to restart reading of the screen if text
that's already been read changes.

I almost fell into this pit of just constantly saying off-hand that
things "Aren't proper", flippantly, because, hey, I am the expert,
right?  It gets a little old when people won't explain their
self-fulfilling prophecies in a community of experts, esp when
newcomers might just believe those prophecies.

Peace,

J

-- 
Justin Alan Ryan
Independent Interaction Architect
http://www.bitmonk.net/
* : +1-415-226-1199 x2600

"All because of a bunch of stuff that happened.."
 -Homer Simpson
"The best way to get in touch with me is PayPal.
 -Alexander Limi

Received on Monday, 18 August 2008 15:45:57 UTC