Hololink UI is under active development. Components, APIs and these docs may change without notice.
Holo Radio & Radio Group
<holo-radio-group> is a form-associated custom element that owns the selected value for a set of <holo-radio> children. It manages roving tabindex keyboard navigation (Arrow keys, Home, End) across its options, so only one radio is ever a tab stop at a time.
<holo-radio-group> sets role="radiogroup" on itself. It takes aria-label from label, and sets aria-required and aria-disabled from required and disabled. Each <holo-radio> sets role="radio" and aria-checked on itself, and aria-disabled when disabled. The visible circle is aria-hidden. The group is form-associated through ElementInternals: its value is the selected radio’s value, and required with nothing selected reports “Please select an option.”.
Key
Action
Tab
Moves focus into the group (to the checked radio, or the first if none) and out of it
ArrowDown, ArrowRight
Moves to the next enabled radio (wraps) and selects it
ArrowUp, ArrowLeft
Moves to the previous enabled radio (wraps) and selects it
Home
Moves to the first enabled radio and selects it
End
Moves to the last enabled radio and selects it
Space, Enter
Selects the focused radio
Radios use roving tabindex: only one radio is a tab stop at a time.
Disabled radios are skipped by the arrow keys, Home and End, and are never a tab stop.
The checked circle shows a visible focus ring with :host(:focus-visible).
You provide:
A label on <holo-radio-group> that names the question (“Delivery speed”). Without it the group has no accessible name.
Visible text for each radio, through the label prop or slotted content.
Radios inside a <holo-radio-group>. A standalone holo-radio has no roving tabindex and no group semantics.