More information about the Underscore mailing list

[_] Tabbing within javascript widgets

Sam Dwyer underscore404 at
Tue Dec 1 14:31:53 GMT 2009

                Hello [_],

I'm working on a lightbox style javascript plugin that pops up an
image with 

next+previous buttons and a close button. I want to make it
so that tabbing 

will only jump between the three presented buttons in
the popup, not go 

through the three of them and then continue on the
page content in the 


Currently I'm thinking that the best way is to make an array of
elements when the popup appears and just capture tabs to
iterate through 
that array setting focus on each one and preventing
default tab behaviour.

The only other thing I can think of is to dynamically change the tabindex of
the elements as the user tabs, so when it gets to the end element I set the 
first element to be the next tabbed location.

Anyone know if there are any best practices regarding this?


View your other email accounts from your Hotmail inbox. Add them now.