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

Jim Ley jim.ley at gmail.com
Wed Sep 20 14:07:25 PDT 2006


On 20/09/06, Hallvord R M Steen <hallvors at gmail.com> wrote:
> <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.)

The reason being you'd not heard of the hidefocus attribute :-)  or
onfocus="this.hideFocus=true" if you want to be free.

> 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.

Right so ignore it.

> We need some prose in a spec that allows a user agent to ignore blur() for
> accessibility reasons.

Why do you?  there's no prose in any spec which says you have to
support any script etc., and if there is, I would encourage you to
break it anyway, obviously anything that harms accessibility to your
users is something that it is your duty as a web-browser company to
not do.

I can appreciate you'd rather point to some other place and go "look,
look they said it was okay", but in that case you already have it UAAG
is fine for that.  I don't think it's good to spell out and make
specifications even longer just to give you somewhere to point pretty
deluded authors.

> '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 don't like this, it doesn't define hinder well enough for a MUST,
can't you just take it as read that you're allowed to?

I can't foresee any realistic collateral damage from actually blocking
the behaviour - but if that genuinely is the case, then removing blur
entirely would be a more appropriate solution.

Mostly though I encourage you to continue in the vein of promoting
your user, rather than hiding behind spec's, you've done it so well to
date!

Jim.



More information about the whatwg mailing list