/** * Roving tab index utility for arrow-key navigation within groups. * * Implements the WAI-ARIA roving tabindex pattern: only one item * in the group has tabindex="0" (the active item), while all others * have tabindex="-1". Arrow keys move focus between items. * * @module bquery/a11y */ import type { RovingTabIndexHandle, RovingTabIndexOptions } from './types'; /** * Sets up roving tab index navigation for a group of elements. * * Only the active item receives `tabindex="0"`, making it the only * tabbable element in the group. Arrow keys move focus between items, * and Home/End jump to the first/last item. * * @param container - The parent element containing the navigable items * @param itemSelector - CSS selector for the navigable items within the container * @param options - Configuration options * @returns A handle with `destroy()`, `focusItem()`, and `activeIndex()` * * @example * ```ts * import { rovingTabIndex } from '@bquery/bquery/a11y'; * * const toolbar = document.querySelector('[role="toolbar"]'); * const handle = rovingTabIndex(toolbar, 'button', { * orientation: 'horizontal', * wrap: true, * }); * * // Later, clean up * handle.destroy(); * ``` */ export declare const rovingTabIndex: (container: HTMLElement, itemSelector: string, options?: RovingTabIndexOptions) => RovingTabIndexHandle; //# sourceMappingURL=roving-tab-index.d.ts.map