Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (34 sloc) 1.65 KB
<?xml version="1.0"?>
<entry type="selector" name="tabbable">
<title>:tabbable Selector</title>
<desc>Selects elements which the user can focus via tabbing.</desc>
<p>Some elements are natively tabbable, while others require explictly setting a positive tab index. In all cases, the element must be visible in order to be tabbable.</p>
<p>Elements of the following type are tabbale if they do not have a negative tab index and are not disabled: <code>input</code>, <code>select</code>, <code>textarea</code>, <code>button</code>, and <code>object</code>. Anchors are focusable if they have an <code>href</code> or positive <code>tabindex</code> attribute. <code>area</code> elements are focusable if they are inside a named map, have an <code>href</code> attribute, and there is a visible image using the map. All other elements are tabbable based solely on their <code>tabindex</code> attribute and visibility.</p>
<p><em>Note: Elements with a negative tab index are <a href="/focusable-selector/"><code>:focusable</code></a>, but not <code>:tabbable</code>.</em></p>
<desc>Select tabbable elements and highlight them with a red border.</desc>
input {
border: 1px solid #000;
div {
padding: 5px;
<div><input value="no tabindex"></div>
<div><input tabindex="5" value="positive tabindex"></div>
<div><input tabindex="-1" value="negative tabindex"></div>
$( ":tabbable" ).css( "border-color", "red" );
<category slug="selectors"/>
<category slug="ui-core"/>
Something went wrong with that request. Please try again.