[whatwg] scripts that remove focus from links during document navigation

Hallvord R M Steen hallvors at gmail.com
Wed Sep 20 07:26:00 PDT 2006

( Previously sent to public-webapi at w3.org list but Anne v K agrees it
probably belongs here.. )

Opera has a serious usability problem for keyboard- and device-users when
pages do the following:

<a href="" onfocus="this.blur()">

This coding is very common because IE adds a small outline border to
focused links. Authors who do not like this will blur links when they are
activated to avoid this cosmetic issue. (Mea culpa: I've done exactly this
myself in sites I coded as a newbie, for that very reason.)

In Opera, when keyboard navigation hits this link, focus is removed. Thus
the link can not be activated from the keyboard and navigation may have to
start from the top of the document again.

We need some prose in a spec that allows a user agent to ignore blur() for
accessibility reasons. This text has been suggested by Fabian Valkenburg:

'scripts must not alter focus-related issues in a way that hinder keyboard
operation, and user agents may override any such use of focus-related
scripting operations.'

I'm not sure what spec to put it in, and we've also discussed possible
collateral damage if sites use this in legitimate ways. Thoughts?

Hallvord R. M. Steen

More information about the whatwg mailing list