shadcn-ui for Phoenix shadix.workinghypothes.is
elixir phoenix shadcn

fix(website/checkbox): wrap checkbox in a <label> so clicking text toggles it master

The checkbox doc page rendered the label text as a plain <span> beside the checkbox, so there was no HTML association between them — clicking the text did nothing. Replace the outer <span> wrapper with a <label>; a <label> wrapping its input forwards clicks to the box natively (no `for` attribute needed). Also give each demo a distinct field name (agree/agreed/locked) so generated checkbox ids are unique. All three demos previously shared field name `agree`, producing duplicate id="agree" — which breaks LiveView DOM patching and would make a for="agree" association ambiguous. Adds a live test asserting each checkbox on the page sits inside a <label>.


+26 -10
2 changed files