Class: TabbingManager

Drupal~ TabbingManager

new TabbingManager()

Provides an API for managing page tabbing order modifications.

Methods

activate(tabbingContext)

Makes all elements outside of the tabbingContext's set untabbable.

Elements made untabbable have their original tabindex and autofocus values stored so that they might be restored later when this tabbingContext is deactivated.

Name Type Description
tabbingContext Drupal~TabbingContext

The TabbingContext instance that has been activated.

Constrain tabbing to the specified set of elements only.

Makes elements outside of the specified set of elements unreachable via the tab key.

Name Type Description
elements jQuery

The set of elements to which tabbing should be constrained. Can also be a jQuery-compatible selector string.

Fires:
Returns:
Type Description
Drupal~TabbingContext The TabbingContext instance.

deactivate(tabbingContext)

Restores that tabbable state of a tabbingContext's disabled elements.

Elements that were made untabbable have their original tabindex and autofocus values restored.

Name Type Description
tabbingContext Drupal~TabbingContext

The TabbingContext instance that has been deactivated.

recordTabindex($el, level)

Records the tabindex and autofocus values of an untabbable element.

Name Type Description
$el jQuery

The set of elements that have been disabled.

level number

The stack level for which the tabindex attribute should be recorded.

Restores a former tabbingContext when an active one is released.

The TabbingManager stack of tabbingContext instances will be unwound from the top-most released tabbingContext down to the first non-released tabbingContext instance. This non-released instance is then activated.

restoreTabindex($el, level)

Restores the tabindex and autofocus values of a reactivated element.

Name Type Description
$el jQuery

The element that is being reactivated.

level number

The stack level for which the tabindex attribute should be restored.