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

[whatwg] Scoped tabindex proposal

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Thu, 31 Aug 2006 17:28:35 -0700
Message-ID: <004601c6cd5d$8fdd1080$3401a8c0@TERRA>

----- Original Message ----- 
From: "Simon Pieters" <zcorpan@hotmail.com>
To: <whatwg at whatwg.org>
Sent: Thursday, August 31, 2006 11:20 AM
Subject: [whatwg] Scoped tabindex proposal


> Hi,
>
> 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.
>
> 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 is better to use another attribute for that, say - tabgroup.
It should accept exactly the same set of values as tabindex.

<input tabindex="1" />
<foo tabgroup="2">
    <input tabindex="1" />
    <input tabindex="2" />
</foo>
<input tabindex="3" />

The order of tab traversal of inputs will be in this case as
their natural order (in this case).

tabgroup marked element may or may not have tabindex
defined - so it can be focusable by itself.
If both tabgroup and tabindex are defined and have numeric values then
tabindex value is used as an index.

So it will be possible to say:
<foo tabindex="2" tabgroup >

Andrew Fedoniouk.
http://terrainformatica.com
Received on Thursday, 31 August 2006 17:28:35 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:28 UTC