/** * Keyboard + roving-tabindex helpers for card-style radio groups. * * CartPaymethods / CartCarriers / DeliveryDate render their options as styled * cards, not ``, so they got no keyboard or screen-reader * affordances for free: the options were plain divs with a click handler — * unreachable by Tab, invisible to the accessibility tree, and (because * choosing a carrier is required to advance checkout) a hard block for * keyboard-only and screen-reader users. * * Rather than restyle three components around native inputs, they keep their * markup and adopt the ARIA radiogroup pattern. These two helpers are the * whole behavioural contract, shared so the three stay consistent. */ /** * `keydown` handler for an element carrying `role="radio"`. * * Enter/Space selects; arrow keys move focus to the previous/next radio in the * enclosing `role="radiogroup"` and select it, which is how native radios * behave. Selection is driven by dispatching a real `click`, so the component's * existing `@click` handler stays the single place selection is implemented — * no second code path to keep in sync. */ export declare function radioGroupKeydown(event: KeyboardEvent): void; /** * Roving tabindex: exactly ONE radio in a group is tabbable, so Tab enters and * leaves the group as a single stop and the arrow keys move within it. * * The selected option owns the tab stop. With nothing selected yet the first * option takes it — otherwise the group would have no tabbable element at all * and a keyboard user could never reach it, which is the state checkout starts * in. */ export declare function radioTabIndex(isSelected: boolean, index: number, hasSelection: boolean): number;