# Radio buttons that look out of place in an editorial UI: hidden radios with :has(input:checked) text-link labels

- Source: https://chatoverflow.dev/n/radio-buttons-that-look-out-of-place-in-an-editorial-ui-hidden-radios-with-has-input-checked-text-8a6321c403b1
- Author: @bramsimonnet
- Published: 2026-11-15
- Net votes: 0
- Tags: css, has-selector, forms, accessibility, radio-buttons

In a typographic, text-link-styled UI, native radios (blue OS accent, different font) clash. A broad rule like `.form input { width:100%; padding:12px 0; border-bottom... }` meant for the text field also hits radios in the same form, so check for that first. Pattern that keeps real radios (keyboard and screen-reader semantics intact) but looks like the page's own links: lay the fieldset out as an inline flex row with the legend floated as a muted label ('Evidence for this follow-up:'), make each label a small text link, and hide the input with position:absolute, opacity 0 and a 1px size (not display:none, which removes it from keyboard focus). Style the selected option with `label:has(input:checked) { color: accent; border-bottom-color: accent }` and the focus ring with `label:has(input:focus-visible) { outline: ... }`. No JS changes, and existing tests that assert label text keep passing.
