Using TABINDEX to remove from tab order?

L

LRW

I'm wanting to completely remove some textareas and A-links from the
tab order of a form, so as you're tabbing down a list of checkboxes,
the cursor doesn't skip over to another element in between.
Is there a way to do that?
I tried TABINDEX=0 but that did nothing.
And I can't TABINDEX=1 through whatever on the checkboxes then go
through the other elements, because the page is actually dynamically
created with PHP. I need something I can put into the TEXTAREA and A
HREF tags that will be the same for each one to prevent it from being
in the tab order.

Any sugggestions?
Thanks!!
Liam
 
J

Jukka K. Korpela

I'm wanting to completely remove some textareas and A-links from the
tab order of a form, so as you're tabbing down a list of checkboxes,
the cursor doesn't skip over to another element in between.

Why would you do that? You would then prevent anyone using keyboard-only
access from getting to the textareas and links at all.
Is there a way to do that?

To tell a white lie, no.
I tried TABINDEX=0 but that did nothing.

Where did you put it, and why didn't you post a URL so that we could see
what you actually did? The effect depends on the page and its TABINDEX
values as a whole.
And I can't TABINDEX=1 through whatever on the checkboxes then go
through the other elements, because the page is actually dynamically
created with PHP.

The specifications tell how TABINDEX is supposed to work. Why do you try
using it in an apparently random way?
I need something I can put into the TEXTAREA and A
HREF tags that will be the same for each one to prevent it from being
in the tab order.

No, you don't. Please explain the original problem that made you think
so, and post the URL.
 
L

LRW

Jukka K. Korpela said:
Why would you do that? You would then prevent anyone using keyboard-only
access from getting to the textareas and links at all.


To tell a white lie, no.


Where did you put it, and why didn't you post a URL so that we could see
what you actually did? The effect depends on the page and its TABINDEX
values as a whole.

Well, I can't post a URL because it's for an internal Web site at
work, behind a firewall.
It's a PHP page that generates a list of items from a database based
on particular conditions, each item having a checkbox. The goal is the
user is to select certain items they want to send on to place X.
The other form elements being a textarea which most of the time is
autimatically filled with text from the database, but sometimes not,
and the user has the option to add something or change what's there.
And an image of an item, hyperlinked to a pop-up window that shows a
larger version of the image.
So, the way the users prefer it to work, is to just be able to TAB
through the list, SPACEBARing the items they want to select. In
essence, to be able to just quickly
TAB-TAB-SPACE-TAB-SPACE-TAB-SPACE-TAB-TAB-TAB-SPACE-etc through the
list without having the cursor suddenly jump over to the textarea or
the linked image.

Make sense?
I tried putting the TABINDEX=0 within the TEXTAREA and A HREF tags.

I guess they'll just have to deal, and use their mice to scroll and
select. =/
Thanks,
Liam
 
J

Jukka K. Korpela

Well, I can't post a URL because it's for an internal Web site at
work, behind a firewall.

As you wish. If you don't want to take the trouble of constructing a
demonstration of the situation on the Web, with confidential information
removed as needed, then you can't realistically expect to be helped. Our
crystal balls are already overheated.
 
Joined
Jul 1, 2009
Messages
1
Reaction score
0
In case anyone comes across this post and wants a real answer to the question. Just set your tabindex to a negative number. tabindex="-1"
This removes it from the tab order.
 
Joined
Dec 12, 2009
Messages
2
Reaction score
0
jstrid_01 said:
In case anyone comes across this post and wants a real answer to the question. Just set your tabindex to a negative number. tabindex="-1"
This removes it from the tab order.

Thanks for a straight answer, this helped me immensely!!
 
Joined
Dec 12, 2009
Messages
2
Reaction score
0
Jukka K. Korpela said:
(LRW) wrote:

> Well, I can't post a URL because it's for an internal Web site at
> work, behind a firewall.


As you wish. If you don't want to take the trouble of constructing a
demonstration of the situation on the Web, with confidential information
removed as needed, then you can't realistically expect to be helped. Our
crystal balls are already overheated.

--

Jukka, there was no need to be so snippety. If you know the answer, why not give it instead of trying to make the person feel like they're not doing enough to satisfy YOU. See the post below yours for a satisfactory and HELPFUL answer.
 
Joined
Dec 14, 2010
Messages
1
Reaction score
0
Unanswered Tabindex Question

The tabindex -1 thing was helpful, but I am having troubles like the thread starter.

I am looking to make a list of checkboxes from items in a database like so.

PHP:
while($row = mysql_fetch_array($cropsResult)){
			echo "<tr><td class=\"toBuyList\"><input type=\"checkbox\"  name=\"hay[]\" value=\"" . $row['cropType'] . "\" tabindex=\"5\"/> " . $row['cropType'] . "</td></tr>";
		}

I have not been able to get any items on that dynamic list into the tab index, even if the list has a size of one.
 
Joined
Dec 30, 2010
Messages
2
Reaction score
0
May or may not help, and for others with similiar form control requirements,
best to use postive tabIndex values for the elements you DO want focus to, as section 508 compliance /people with screen readers still need to potentially get to those anchors/etc.

by setting the tabIndex val to increasing positive numbers, its creating a priority queue...if you really only have two sets..ones with or without priority, you can give the priority ones the same val (such as all of them being tabIndex=1) then all those elemenets will get tabbed to first...then all the remaining ones after wards...(with tabIndex not set or set to "0")

tabIndex of -1 wont ever let you get to them via keyboard although programatically you can still get there.(such as doc.getElementByID.focus()

also note the tabIndex capitalization..it matters on some browsers -_- lowercase t and uppercase I.

making a website §508 compliant over just sorta ignoring :)finger: ) your screen reading counterparts is most likly a better way to go ;)
 
Joined
Dec 30, 2010
Messages
2
Reaction score
0
:edit:
rcof said:
May or may not help, and for others with similiar form control requirements,
best to use postive tabIndex values for the elements you DO want focus to, as section 508 compliance /people with screen readers still need to potentially get to those anchors/etc.

by setting the tabIndex val to increasing positive numbers, its creating a priority queue...if you really only have two sets..ones with or without priority, you can give the priority ones the same val (such as all of them being tabIndex=1) then all those elemenets will get tabbed to first...then all the remaining ones after wards...(with tabIndex not set or set to "0")

tabIndex of -1 wont ever let you get to them via keyboard although programatically you can still get there.(such as doc.getElementByID.focus()

also note the tabIndex capitalization..it matters on some browsers -_- lowercase t and uppercase I.

making a website §508 compliant over just sorta ignoring :)finger: ) your screen reading counterparts is most likly a better way to go ;)


additionally, A, AREA, BUTTON, INPUT, OBJECT, SELECT, and TEXTAREA are the only elements to support tabIndex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top