[whatwg] tabindexscope

Ian Hickson ian at hixie.ch
Mon Jan 30 13:54:45 PST 2012


On Tue, 8 Nov 2011, Ojan Vafai wrote:
>
> We keep running into the use case where the physical position matters 
> for the tab order. The problem with just setting tabIndex (or CSS3 
> tab-index) is that it takes the thing out of the natural order.
> 
> This problem comes up in a lot of places (e.g. absolute positioning). 
> It's recently come up for CSS flexboxes, e.g. if you set flex-order or a 
> reverse flow, then the tabindex still being in document order is often 
> not what the author wants 
> (https://bugs.webkit.org/show_bug.cgi?id=62664).
> 
> <button tabindex=0>A</button>
> <div tabindex=2 tabindexscope>
> <button tabindex=2>C</button>
> <button tabindex=1>B</button>
> </div>
> <button tabindex=1>D</button>
> 
> The order for the tabbing would be A-D-B-C.

The spec says that the order when you omit tabindex (or set it to 0) 
should follow platform conventions. If the platform convention is to make 
the tab order follow the visual position, then that's what the browser 
should do.

Surely that would be better than having authors manage local regions for 
tabindex, especially since the positioning depends on the CSS level, not 
the HTML level, and thus trying to manage the tabindex in the HTML would 
be a layering violation anyway.


On Wed, 9 Nov 2011, Simon Pieters wrote:
> 
> http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-August/007228.html
> :-)

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2008-May/014938.html

:-)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list