Unfortunately I can't remember the details. Blake Sullivan and Andy Schwartz aren't around this week, but they may know more.

What happens to components that don't have a tabindex set, meaning do you have to set it on everything in the page once you set it on one thing?

Thanks,

Gab

Andrew Robinson wrote:
On Tue, Mar 18, 2008 at 11:28 AM, Gabrielle Crawford
<[EMAIL PROTECTED]> wrote:
I know this has been considered many times in the past, but not
 implemented due to complexity.

What complexity are you referring to? Could you please provide
concrete examples? Thanks.

 When you know the details of the implementation, can you start a new
 thread with [Trinidad] in the subject?

Done, but kept the reply ID intact for threaded email reading.

 How will it work with stamping,
 components with multiple tab stops, etc.

Tab indexes do not have to be unique. Browsers support this as it is a
w3c requirement.
Example:

<a href="#" tabindex="5">
  <input type="checkbox" tabindex="5" />
  <input type="text" tabindex="5" />
</a>
<a href="#" tabindex="7">
  <input type="checkbox" tabindex="7" />
  <input type="text" tabindex="7" />
</a>

<a href="#" />

The browser will tab to the first element with 5 first, then to each
element with 5 next. After all of the 5's are visited it will go to
the 7's as there are none with a tab index of 6.

The last anchor gets a default tab stop that will be focused after
every element that has an explicit tab stop has already been visited.

So stamping is not an issue if implemented correctly (all components
in a table are given the same tab index). If users want different tab
indexes per component, per row, the tabIndex supports EL, so users can
"easily" program around this problem by incrementing something like a
counter in a backing bean. Example:
<tr:commandLink tabIndex="1" />
<tr:table varStatus="_status" ...>
  <tr:column>
     <tr:commandLink tabIndex="#{_status.index + 2}" />
  </tr:column>
  <tr:column>
     <tr:commandLink tabIndex="#{_status.index + 3}" />
  </tr:column>
</tr:table>

or:

<tr:commandLink tabIndex="#{bean.nextTabIndex}" />
<tr:table>
  <tr:column>
     <tr:commandLink tabIndex="#{bean.nextTabIndex}" />
  </tr:column>
  <tr:column>
     <tr:commandLink tabIndex="#{bean.nextTabIndex}" />
  </tr:column>
</tr:table>

Please see the specification for more information on the tabIndex:
http://www.w3.org/TR/html4/interact/forms.html#adef-tabindex

Reply via email to