W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2006

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

From: Jim Ley <jim.ley@gmail.com>
Date: Wed, 20 Sep 2006 22:07:25 +0100
Message-ID: <851c8d310609201407m7486b14cr9150095cbf050855@mail.gmail.com>
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.
Received on Wednesday, 20 September 2006 14:07:25 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:48 UTC