W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2008

[whatwg] Scoped tabindex proposal

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 30 May 2008 22:05:22 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0805300221490.8559@hixie.dreamhostps.com>

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


> 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
>   indicates:
>   <p><a href="#">first</a>
>   <table tabindex="scoped">
>    <tr>
>     <td><a href="#" tabindex="1">second</a>
>     <td><a href="#" tabindex="3">forth</a>
>    <tr>
>     <td><a href="#" tabindex="2">third</a>
>     <td><a href="#" tabindex="4">fifth</a>
>   </table>
>   <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:
> 
>   http://accessifyforum.com/viewtopic.php?t=6034

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.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 30 May 2008 15:05:22 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:02 UTC