Interface KeyboardDriverGroup

A group of Roots. When a TabSelectEvent is not captured by a Root in a group, the TabSelectEvent is carried over to the next (or previous, depending on the direction) root in the group. Although TabSelectEvent events are carried over between Roots in the same group, they are not automatically carried over between different groups.

This behaviour is useful for binding Roots to DOM elements. For example, DOMRoots should be placed in groups with a single DOMRoot, since the DOMRoot owns its own DOM element, but Roots used for an external 3D engine, where the roots share a single DOM element such as a canvas used as the output for rendering, should all be in the same group.

interface KeyboardDriverGroup {
    enabledRoots: Root[];
    roots: Root[];
    tabbableRoots: Root[];
    wrapsAround: boolean;
}

Hierarchy (view full)

Properties

enabledRoots: Root[]

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

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.

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.