Is it possible to change tab/focus order in an HTML table so that it transfers vertically first and then horizontally?
Another related tactic is to use the tabindex attribute. A tabindex of -1 (tabindex="-1") will remove an element from the tab order. A tabindex of 0 (tabindex="0") will add an element to the focus order. It is highly recommended to avoid positive tabindex values and to structure your DOM in the correct order.
The tabindex attribute specifies the tab order of an element (when the "tab" button is used for navigating). The tabindex attribute can be used on any HTML element (it will validate on any HTML element.
The only way to change this order is to reorder your HTML elements. tabindex itself can do 2 things: it sets the order of "focusable" elements. it makes element "focusable".
I suppose you have some kind of input elements in your table and on those you can set the tabindex attribute.
<TABLE>
<TR>
<TD><INPUT NAME="Name" TABINDEX=1></TD>
<TD><INPUT NAME="Age" TABINDEX=3></TD>
</TR>
<TR>
<TD><INPUT NAME="Sex" TABINDEX=2></TD>
<TD><INPUT NAME="Location" TABINDEX=4></TD>
</TR>
</TABLE>
Look at the tabindex
attribute.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With