Forum Moderators: open

Message Too Old, No Replies

Separating behaviour and structure.

Taking XHTML to the next level?

         

BlobFisk

9:54 am on May 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[digital-web.com...]

At this stage most (if not all) see the many and huge advantages of serperating style from content - one of the basic tenets of XHTML.

This article is an interesting exploration of seperating bahaviour and structure trying to find a middle ground between those that say that there is no place for (client-side) scripts in web pages and those that advocate the use of scripting to enhance the user experience.

Personally, I find it a tough call some of the time. The aim to achieve as high a degree of usability and accessibility weighted against the desire to create a rich user interaction experience.

The proposal in the article is to completely strip all scripted behaviours out of our XHTML. So, where we once had:


<a href="#" onMouseOver="someFunction('arguement1', 'arguement2'); return true" onMouseOut="someFunction('arguement1', 'arguement2'); return true" onClick="someFunction('arguement1'); return false">

We should now have:


<a href="link.html" id="linkID" title="Link Title">

Much, much neater and far more accessible and usable (not to mention SE friendly).

I think that it does persent us with some more work on our hands to cater for this approach and I accept that this is not possible in many projects - but I think that the advantages that it brings is well worth the effort.

Are there many WebmasterWorlders that have already adopted this approach? Would you consider moving to this method considering that there is some extra work involved? I'd be interested in hearing peoples opinions on this.

Afterthought: You could call it the paradox of weighing the user advantages against the project workload!

<edit>: Typo fix</edit>

[edited by: BlobFisk at 10:13 am (utc) on May 20, 2004]

jetboy_70

10:09 am on May 20, 2004 (gmt 0)

10+ Year Member



BlobFisk, thanks for bringing this up. I only use a minimal amount of Javascript nowadays, but PPK's article is a bit of an epiphany.

Just like moving over from font tags to CSS (which he mentions) and tables to CSS-P, it's time to adapt again.