Interface DOMKeyboardDriverGroup

A KeyboardDriverGroup bound to a DOM element, with extra properties used for cleaning up event listeners.

interface DOMKeyboardDriverGroup {
    blurListen: ((event: FocusEvent) => void);
    domElem: HTMLElement;
    enabledRoots: Root[];
    focusListen: ((event: FocusEvent) => void);
    keydownListen: null | ((event: KeyboardEvent) => void);
    keyupListen: null | ((event: KeyboardEvent) => void);
    origTabIndex: number;
    roots: Root[];
    selectable: boolean;
    tabbableRoots: Root[];
    wrapsAround: boolean;
}

Hierarchy (view full)

Properties

blurListen: ((event: FocusEvent) => void)

"blue" event listener. For cleanup only

domElem: HTMLElement

The DOM element where the event listeners are added

enabledRoots: Root[]

Similar to KeyboardDriverGroup#roots, but only contains enabled Roots.

focusListen: ((event: FocusEvent) => void)

"focus" event listener. For cleanup only

keydownListen: null | ((event: KeyboardEvent) => void)

"keydown" event listener. For cleanup only

keyupListen: null | ((event: KeyboardEvent) => void)

"keyup" event listener. For cleanup only

origTabIndex: number

The original tabIndex of the DOM element. For cleanup only

roots: Root[]

The list of Roots assigned to this group, in the order they were added to this group. Not to be confused with KeyboardDriver#accessList.

selectable: boolean

If true, then the DOM element's tabIndex will be set to 0 if negative, so that it can be selected via tab focus. Defaults to true.

tabbableRoots: Root[]

Similar to KeyboardDriverGroup#enabledRoots, but only contains enabled Roots that are Root#tabFocusable.

wrapsAround: boolean

Should TabSelectEvent events wrap-around to the other end of the group if not captured by the last (or first) Root? If this is true, the navigation will be trapped to this group for keyboard-only users, since that will be the only way to change keyboard focus. Useful for 3D engines where all Roots share the same canvas.