« color theory 101 | Main | business of user experience »

Friday, 16 January 2004

Benefits and Best Uses of JavaScript

digitalweb mag's new article on the benefits and best uses of JavaScript:

paul koch describes the 4 views that need to be designed for:

1. plain view (xhtml only)
2. simple presentation view (xhtml + css)
3. simple behavior view (xhtml + js)
4. full view (xhtml + css + js)

There are three general rules for the use of JavaScript in an accessible site.

   1. The site should still work when the browser doesn’t support JavaScript, obviously.
   2. The script should still work when the browser doesn’t support CSS. A script may not rely on style changes alone to achieve its purpose. Creating a behavior layer without assuming the existence of a presentation layer to back it up can be tricky. I feel we should pay more attention to this problem in the coming year.
   3. Styles that hide content and are meant to be overruled by a script, should be set in JavaScript. If you add display: none to your CSS and rely on JavaScript to toggle it, your site will degrade fast when JavaScript is disabled but CSS is enabled.

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8342027e953ef00d835387cd269e2

Listed below are links to weblogs that reference Benefits and Best Uses of JavaScript:

Comments

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.