What the component guarantees
- Native radios in a radiogroup. Each option is a real
<input type="radio">sharing yourname, inside a<label>with its text. The options sit in arole="radiogroup"labelled by the group'slabel(aria-labelledby), so a reader says "Plan, radio group" before the first option. - Validation on the group. With
error, the radiogroup carriesaria-invalid="true", andaria-describedbypoints at the visible message by its id ({id}-error,{id}-warning,{id}-helper). A message present on first render is read on entering the group and not announced on load; one that appears or changes later mounts withrole="alert"(error) orrole="status"(warning). - Disabled and read-only.
disableddisables every input natively and setsaria-disabledon the group; a disabled option is skipped by the arrow keys.readonlykeeps the choice visible and refuses changes. - A visible focus ring on the drawn circle under
:focus-visible. - A fingertip target on phones: each option row is 44px tall on a phone touch screen, and the
hit-areamixin gives the circle a 44px square. A desktop is unchanged. - Tested in
tests/Radio.test.tsandtests/fieldValidationAria.test.ts, and by axe intests/axe.test.ts.
Keyboard
The browser's own radio group behaviour, which is the WAI-ARIA one:
| Key | Action |
|---|---|
| Tab | Into the group, on the checked option (or the first) |
| ↑ ↓ ← → | Moves to and selects the previous or next option, wrapping |
| Space | Selects the focused option if none is selected |
What you own
- A
nameunique to the group on the page. Two groups with onenameare one group to the browser and to the arrow keys. - A
labelfor the question the options answer. Without it the radiogroup is unnamed. - Whether arrows should act. Arrowing selects, so an option that triggers work on selection (a filter that refetches) fires as the user moves through the list.
Known gaps
readonlyis not a state radios have natively, and the group does not carryaria-readonly, so a reader announces read-only options as editable. Prefer showing the chosen value as text when it cannot change.- No manual screen reader pass has been recorded for this component.