2 * jQuery UI Tabbable 1.12.1
5 * Copyright jQuery Foundation and other contributors
6 * Released under the MIT license.
7 * http://jquery.org/license
10 //>>label: :tabbable Selector
12 //>>description: Selects elements which can be tabbed to.
13 //>>docs: http://api.jqueryui.com/tabbable-selector/
15 ( function( factory ) {
16 if ( typeof define === "function" && define.amd ) {
18 // AMD. Register as an anonymous module.
19 define( [ "jquery", "./version", "./focusable" ], factory );
27 return $.extend( $.expr[ ":" ], {
28 tabbable: function( element ) {
29 var tabIndex = $.attr( element, "tabindex" ),
30 hasTabindex = tabIndex != null;
31 return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );