#88558 - labels being focusable

Lubos Lunak l.lunak at suse.cz
Fri Oct 22 17:06:47 BST 2004


On Friday 22 of October 2004 17:48, Tobias Anton wrote:
> On Freitag, 22. Oktober 2004 11:52, Lubos Lunak wrote:
> > > > In which spec have you read that labels should be Tab focusable?
> > >
> > > In the html spec, which you're obviously unaware of.
> >
> >  And which you don't feel bothered enough to quote and or at least link
> > to.
>
> I supposed you knew where to find it, sorry for my ignorance. But frankly,
> I don't think it's worth to discuss this issue with somebody who doesn't
> even know on what definition my implementation is based upon, which also
> applied to you until you wrote this mail.

 Oh well, I know already enough weird specs, I didn't feel much like doing a 
thorough investigation of relevant parts of HTML spec for what seemed to be 
an obvious bug. And since your first reply lacked this reason and it all 
seemed like your personal experiment, it didn't even occur to me the spec 
would mandate this.

 I think after the mail from Franck it's quite clear the spec says labels 
should be tab focusable. It also makes it quite clear it's nonsense in 
practice. So in practice my point still remains. No spec is needed to see the 
extra tab keypress on seznam.cz is annoying.

> > a) the element is right after the label in focus tab - just not having
> > the label in tab order will in practice be the same like the label
> > receiving the focus and forwarding it to the element
>
> With the difference that the label's onfocus and onblur handler are fired
> before the element gets focus. This can lead to a different event flow.

 True. The question is if that would matter, and if actually somebody would do 
that, given what Mozilla etc. do. If you can't focus them, the handlers don't 
matter. And Mozilla really doesn't focus the label, I checked with the onblur 
handler (and I changed the a's to input's). If major browsers don't support 
it anyway, there needs to be an alternate way, and this behavior cannot be 
relied upon.

>
> >  Moreover, your implementation is against the spec. It doesn't forward
> > the focus, as requested in the spec and quoted by me above.
>
> And exactly this is what we have to fix. But how to forward the focus
> without breaking the tab order?

 Especially after reading Franck's mail and the relevant parts of the spec 
again, I think a much simpler way would be if we go back the my very first 
question: Why should labels be focusable? I think I've listed enough reasons 
against.

 Your reasons against were, if I'm not missing any, only two: The spec and 
accessibility. The spec reason can be probably rather well opposed with the 
Mozilla etc. reason, and I still don't get the accessibility reason - given 
that the user can simply work directly with the label's element, what is the 
point of focusing the label? In case you still want to use this argument, 
please be specific - I've already heard generic statements about it improving 
accessibility and usability.

 If you want to do it the hard way and try to implement label focusing 
properly somehow, fine, that's your problem. If you understand KHTML's focus 
handling so well, I'd rather see focus handling related to find-as-you-type 
(#87372) and find-next improved, but oh well, it's your time. But (unlike 
you), I don't care about the general issue, I care about the patch, and about 
the annoying extra tab at seznam.cz and elsewhere. Right now the best 
solution is reverting the patch.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/




More information about the kfm-devel mailing list