//#region src/composables/useFocusTrap/tabbable.d.ts /** * @module tabbable * @internal Second consumer is Treeview; promote to `#v0/utilities` if a third appears. * * @see https://0.vuetifyjs.com/composables/system/use-focus-trap * * @remarks * The "which descendants can Tab reach" rules, shared rather than duplicated. * * Shared by `useFocusTrap` (containment) and `Treeview/TreeviewList.vue` * (roving). Treeview imports this file directly so it does not evaluate * `useFocusTrap/index.ts` (nest stack). It layers its own `aria-disabled` and * treeitem-scope filters on top of {@link tabbable}. The barrel re-exports * `FOCUSABLE` and `tabbable` for public consumers; `isFocusTrapElement` and * {@link follows} stay local. */ /** * An element that can hold focus. `focus()` / `blur()` come from the * `HTMLOrSVGElement` mixin, so SVG content participates alongside HTML. */ type FocusTrapElement = HTMLElement | SVGElement; /** * Candidate tab stops, in document order. * * Every entry is a *potential* stop — negative `tabindex`, `disabled`, `inert`, * `hidden`, collapsed `
`, unchecked radios, and CSS-hidden are * disqualified in {@link tabbable} so one JS pass owns the rules and the * selector stays cheap. * * `input:not([type="hidden"])` is filtered here rather than in JS because it is * strictly cheaper. `button` / `select` / `textarea` carry no `:not([disabled])` * on purpose: property-only disabling and `fieldset[disabled]` inheritance are * invisible to an attribute selector, so disabled state is resolved in JS. * * Deliberately absent: `label` and `fieldset` (not focusable), `[draggable]` * (not focusable), `svg[focusable]` (a dead SVG 1.1 attribute). */ declare const FOCUSABLE: string; /** * Whether a {@link FOCUSABLE} candidate is actually reachable by Tab. * * `aria-disabled="true"` is deliberately **not** filtered: per APG an * aria-disabled control stays in the tab order, so dropping it would let the * browser walk past the computed boundary and out of a trap. * `Treeview/TreeviewList.vue` excludes it for the opposite reason — roving focus * must skip disabled items — so the two filters diverge on purpose, and * Treeview layers that rule on top of this one. */ declare function tabbable(el: Element): el is FocusTrapElement; //#endregion export { FOCUSABLE, FocusTrapElement, tabbable };