...
One primary requirement lacking in jQuery (and in most DHTML toolkits in general) at the moment is robust support for keyboard accessibility. To this end, Fluid is developing a couple of jQuery plugins that will make it significantly easier to create DHTML interfaces that support familiar idioms for navigating with the keyboard.
The Plugins
jQuery.
...
- Provides cross-browser support and normalization for getting, setting, and evaluating the presence of the "tabindex" attribute.
- More information about browser incompatibilities can be found in Simon Bates' recent Fluid blog post
download jQuery.tabIndex plugin
TabIndex API
Code Block |
---|
jQuery().tabindex()
|
Gets the tabindex value of the first matched element. If the element doesn't have a tabindex attribute, undefined is returned. The value returned is normalized to a Number, since browser implementations vary.
Code Block |
---|
jQuery().tabindex(value)
|
Sets the tabindex value on all matched elements. value can be either a String or a Number, but valid tabindex attributes need to be integers.
Code Block |
---|
jQuery().removeTabindex()
|
Removes the tabindex attribute from all matched elements.
Code Block |
---|
jQuery().hasTabindex()
|
Returns true if the element has a tabindex attribute, and returns false if tabindex is not set. Neither Simon or I have yet to come up with a reliable method for querying tabindex attributes on versions of IE < 6, so this method will always return false on IE 5.5 and below.
jQuery.keyboard-a11y
- Makes it easier inject keyboard accessibility into your DHTML interfaces, without having to write onerous hand-rolled code for managing focus and tabbing behaviour.
- Still in development.
...
Activates the specified item using the default activation handler.
jQuery.tabIndex
- Provides cross-browser support and normalization for getting, setting, and evaluating the presence of the "tabindex" attribute.
- More information about browser incompatibilities can be found in Simon Bates' recent Fluid blog post
download jQuery.tabIndex plugin
TabIndex API
Code Block |
---|
jQuery().tabindex()
|
Gets the tabindex value of the first matched element. If the element doesn't have a tabindex attribute, undefined is returned. The value returned is normalized to a Number, since browser implementations vary.
Code Block |
---|
jQuery().tabindex(value)
|
Sets the tabindex value on all matched elements. value can be either a String or a Number, but valid tabindex attributes need to be integers.
Code Block |
---|
jQuery().removeTabindex()
|
Removes the tabindex attribute from all matched elements.
Code Block |
---|
jQuery().hasTabindex()
|
Returns true if the element has a tabindex attribute, and returns false if tabindex is not set. Neither Simon or I have yet to come up with a reliable method for querying tabindex attributes on versions of IE < 6, so this method will always return false on IE 5.5 and below.