On a web page, if there are input fields, pressing Tab key switches them, but in a particular order, is there a way to change this order and set it to some different order?
If this can be done in html, it is preferable, but if some other scripting language (javascript etc) can do it, it is also acceptable.
The attribute
tabindex
takes care of that http://www.w3.org/TR/WCAG-TECHS/H4.html to exclude a element completely from the tabindex give it a index of-1
the lowest safe index to start with is1
.0
is the default value so should be avoided when explicitly setting thetabindex
The tab would go from the
my_input1
tomy_input3
tomy_input2
field in this exampletabindex may be used on
a
,area
,button
,input
,object
,select
andtextarea