views:

943

answers:

3

Is it possible to cancel an <a href="..."> from being tabstopped in any browser? I would like to do this without Javascript.

A: 

No.

The closest you could come is to apply a tabindex attribute to every other focusable element so that the anchor comes last in the tab order.

However, if you want this, then you are probably doing something wrong in the first place.

(And I assume you mean href rather than src)

David Dorward
+3  A: 

Some of the browsers support the "tabindex="-1" attribute, but not all of them, since this is not a standard behaviour.

Roberto Aloi
Oh great! Thanks! I've checked with FF3.5, IE8 and CH3 and it work in all three. Thanks a million!
Robert Koritnik
A: 

I think you could do this by javascript, you override the window.onkeypress or onkeydown, trap the tab button, and set the focus at the desired order.

Ammosi
I don't know whether you've checked other answers especially accepted one that was answered about a year ago and solved this problem **without** using Javascript.
Robert Koritnik