The Focus Manager Node Plugin makes it easy to manage focus among * a Node's descendants. Primarily intended to help with widget development, * the Focus Manager Node Plugin can be used to improve the keyboard * accessibility of widgets.
* When designing widgets that manage a set of descendant controls (i.e. buttons * in a toolbar, tabs in a tablist, menuitems in a menu, etc.) it is important to * limit the number of descendants in the browser's default tab flow. The fewer * number of descendants in the default tab flow, the easier it is for keyboard * users to navigate between widgets by pressing the tab key. When a widget has * focus it should provide a set of shortcut keys (typically the arrow keys) * to move focus among its descendants. *
* To this end, the Focus Manager Node Plugin makes it easy to define a Node's * focusable descendants, define which descendant should be in the default tab * flow, and define the keys that move focus among each descendant. * Additionally, as the CSS * :focus * pseudo class is not supported on all elements in all * A-Grade browsers, * the Focus Manager Node Plugin provides an easy, cross-browser means of * styling focus. *
:focus
plug
Node, or index of the Node, representing the descendant that is either * focused or is focusable (tabIndex attribute is set to 0). * The value cannot represent a disabled descendant Node. Use a value of -1 * to remove all descendant Nodes from the default tab flow. * If no value is specified, the active descendant will be inferred using * the following criteria:
tabIndex
{ next: "down:40", previous: "down:38" }
key
{ className: "focus", fn: myFunction }
fn
focused
descendants