jQuery UI API -: tabbable Selector
category
Selector (Selectors) | the UI core (UI Core)
usage
Description: Choose Users tab key focus element can pass.
Some elements itself is focused through the tab key (tabbable), while other elements need to explicitly set a positive tab index. In both cases, in order to focus through the tab key (tabbable), the element must be visible.
The following types of elements without having a negative tab index and has not been disabled, is focused through tab key (tabbable): input
, select
, textarea
, button
and object
. If the anchor with href
or positive tabindex
attribute, is focused (tabbable) through the tab key. area
elements If a named map, and with a href
attribute, and there is a visible image using the map, it is focused through tab key (tabbable). All other based solely on tabindex
element attributes and visibility is focused through tab key (tabbable).
NOTE: tab element with a negative index is :focusable
, not :tabbable
.
Examples
Select the tab key focus through the elements, and highlighted with a red border.
<! Doctype html> <Html lang = "en"> <Head> <Meta charset = "utf-8"> <Title>: tabbable Selector Examples </ title> <Link rel = "stylesheet" href = "// code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <Style> input { border: 1px solid # 000; } div { padding: 5px; } </ Style> <Script src = "// code.jquery.com/jquery-1.10.2.js"> </ script> <Script src = "// code.jquery.com/ui/1.10.4/jquery-ui.js"> </ script> </ Head> <Body> <Div> <input value = "no tabindex"> </ div> <Div> <input tabindex = "5" value = "positive tabindex"> </ div> <Div> <input tabindex = "- 1" value = "negative tabindex"> </ div> <Script> $ ( ": Tabbable") .css ( "border-color", "red"); </ Script> </ Body> </ Html>