« AutoAssist 0.5.1, Pretty JavaScirpt Ajax Autocomplete Component | Main | Effective Ajax with TurboGears Parper and Screencast »

Accessible forms and unobtrusive javascript

Danne posted a very interesting article about Accessible forms and unobtrusive javascript, where he talk about his experience to developp accessible AJAX forms where user don't have to use mouse at all. Inspite of having :

<a href="#" onclick="myaction()" accesskey="m">My action</a>

He used :

<a href="#" id="myaction" accesskey="m">My action</a>

var sheetRules = {
    '#myaction': function(el) {
        el.onclick = handleMyAction;
    }
Behaviour.register(sheetRules);

I usually try to separate backend logic from the user interface logic when creating new PHP applications. I am pro fat gui and usually have a lot of client side scripting going on. I mostly use AJAX or other remote scripting techniques to call actions defined in the PHP backend. In my latest PHP project, a timesheet application (because all the ones I find are crappy), I went for a really accessible user interface. An interface where you don't have to use the mouse for everything.

I don't want any PHP mixed with my html. I don't want javascript in there either which is why I like the unobtrusive way of adding javascript to my applications. So behaviour fits right into my world. Normally you scatter lots of onclick and other event handling attributes in the html like below.

Bookmark this article at these sites
Post a comment





(Email will remain hidden)





Please enter the security code you see here




Related entries
Email to a friend
Email this article to:


Your email address:


Message (optional):