/** A host node: a DOM element on the web, a native view handle otherwise. */ export type FocusNode = { focus?: (options?: { preventScroll?: boolean; }) => void; } | null | undefined; /** Scroll `node` into view in a card's scrollport, then call `done` (at once when there is nothing to scroll). */ export type RevealInCard = (node: FocusNode, done: () => void) => void; /** * Run `entry`, a card owner's onCardMount, as the card's entry: a focus move it makes * (focusInto, focusFieldInto, moveAccessibilityFocus) has `reveal` scroll its target into * the card's scrollport. Internal to AnchoredOverlay. */ export declare function enterCard(reveal: RevealInCard, entry: () => void): void; /** * Move focus to `node`, inside a card that has just been revealed: DOM focus on the web * (without scrolling the page toward it), the screen reader's natively. */ export declare function focusInto(node: FocusNode): void; /** * Give a text field inside a card that has just been revealed the input focus, where * typing goes (Command's search): DOM focus on the web (without scrolling the page toward * it), and natively the field's own focus, a frame later, with the screen reader moved to * it too (VoiceOver does not follow a field that becomes first responder by itself). */ export declare function focusFieldInto(node: FocusNode): void; /** * Natively, move the screen reader to `node`, leaving DOM focus alone: into a card that * has just been revealed whose web focus another mechanism owns (Popover's panel, * usePopoverFocus), or back to the trigger after a modal card closed, where on the web * the DOM focus a closing card orphaned is restored instead (src/style/use-dialog-focus.ts). * A no-op on the web. */ export declare function moveAccessibilityFocus(node: FocusNode): void; /** * Natively, the text field that holds the input focus, or null: what a card's close * compares with the field that held it when the card was revealed, to tell a field the * close handed the focus to (PhoneInput's pick hands it to the number). Null on the web, * where the close reads the DOM's focus instead. */ export declare function focusedField(): FocusNode; /** * Natively, take the input focus off a text field inside `card` as the card closes, while * the card is still in the window: Android hands the focus of a view removed while it * holds it to the first view of the window that takes focus by touch (a selectable text, * another field), and TalkBack follows it there, past the trigger the close returns it to. * A field outside the card (one the close handed the focus to) keeps it. A no-op on the * web, where the close restores the DOM's focus instead. */ export declare function releaseFieldIn(card: unknown): void; //# sourceMappingURL=accessibility-focus.d.ts.map