CngxTabKeyboardNav
projects/common/tabs/keyboard/tab-keyboard-nav.ts
Referenced by#
Import#
import { CngxTabKeyboardNav } from '@cngx/common/tabs'
Description#
Resolved keyboard surface for <cngx-tab-group>'s tablist. The
organism holds this as one field; the template reads tabTabindex
for the roving stop and routes the tab buttons' (keydown) through
handleKeydown.
Index#
Methods
Methods#
handleKeydown(event: KeyboardEvent)APG tablist navigation: arrow keys (axis from orientation), Home,
and End move between tabs with disabled-skip + loop, activate the
target through host.select() (automatic activation), and move DOM
focus to it. Returns silently for any other key so the caller can
chain further handlers (e.g. Delete-to-close).
KeyboardEvent"0" | unknowntabTabindex(tab: CngxTabHandle)Roving tabindex for a tab button: 0 for the selected tab, -1
for every other. Derived from host.activeId() (Pillar 1: a single
source, never a second index to keep in sync) so the active tab is
the group's lone tab stop and Tab always lands on it.