Expand all

ve.ui.TabIndexScope

Constructor

new ve.ui.TabIndexScope([config]) #

TabIndex Scope container constructor

Parameters:

Name Type Attributes Description
config Object optional

Configuration options

Properties:
Name Type Attributes Default Description
root jQuery optional

Initial root element to scope tabIndex within

skipAriaDisabled boolean optional
true

Whether to skip elements that are just aria-disabled from the order

skipAriaHidden boolean optional
true

Whether to skip elements that are just aria-hidden from the order

wrapAround boolean optional
false

If true, navigating forward from the last element will return to the first element instead of leaving the scope, and navigating back from the first element will return to the last one

Source:
TabIndex Scope container constructor

Methods

getElementsInRoot() → {Array.<HTMLElement>} #

Build a list of elements in the current root, in tab order

This mimics browser behavior: fetch focusable elements, sort by [tabIndex, DOM order]

Source:

Returns:

list of elements in the order they should be tabbed through

Type
Array.<HTMLElement>

Build a list of elements in the current root, in tab order

This mimics browser behavior: fetch focusable elements, sort by [tabIndex, DOM order]

onRootKeyDown(e)private #

Handle keydown events on elements

Parameters:

Name Type Description
e jQuery.Event
Source:
Handle keydown events on elements

setTabRoot($root) #

Set the current root element for tabbing

Parameters:

Name Type Description
$root jQuery

root element to scope tabIndex within

Source:
Set the current root element for tabbing

teardown() #

Teardown tabbable elements manager

Source:
Teardown tabbable elements manager