[whatwg] Scoped tabindex proposal
ian at hixie.ch
Fri May 30 15:05:22 PDT 2008
On Thu, 31 Aug 2006, Simon Pieters wrote:
> Currently if you want to use the tabindex to change the tab order you
> mostly have to specify tabindex on all links and form controls prior to
> the area you want to modify the tab order, because otherwise that area
> would be before all prior elements in the tab order, which in most cases
> isn't wanted. Therefore there's a need to scope tabindex somehow.
In general I think the better solution would be to change the tab order
from CSS using CSS3UI's features, rather than changing the tabindex in
HTML itself. For the rare cases where changing the tabindex is actually
useful, it seems a small cost to require that the values be changed
globally. It's also not that hard, you can just set all the tabindex
values to increasing multiples of 100 in tree order, and then manipulate a
local group by changing the values around.
Basically I don't see this as something that is useful enough to warrant a
> So here's an idea. A new value for the tabindex attribute, "scoped".
> Here's an example:
> <p>The following links should be focused in the order which the link text
> <p><a href="#">first</a>
> <table tabindex="scoped">
> <td><a href="#" tabindex="1">second</a>
> <td><a href="#" tabindex="3">forth</a>
> <td><a href="#" tabindex="2">third</a>
> <td><a href="#" tabindex="4">fifth</a>
> <p><a href="#">last</a>
> The table itself is not in the tab order and is not focusable.
> I'm not sure if we need another attribute or something for this instead
> as .tabIndex is a long and not a DOMString. Or perhaps we could say that
> all elements that have a tabindex attribute is a scoping element, so
> that authors can use tabindex="-1" on the table instead.
It seems like this would have a pretty poor back-compat story.
> Here's a pointer of where this (or something similar) is called for:
This can be solved just by moving the <tfoot>.
(Thanks to all the other people who contributed to this thread and gave
good feedback. I don't have anything to add to those comments.)
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg