Describe the bug
The Label component internally uses input_id/2, never input_id/3. The generated for attribute is never correct for a radio button or checkbox.
As a workaround, I am currently doing
<Label opts={for: nil}>
<RadioButton value="value" />
label text
</Label>
How to reproduce it
Clicking on the label text with this markup
<Label>
<RadioButton value="value" />
label text
</Label>
There are probably also legitimate use cases where wrapping the around the input is not feasible, so it would be good to allow <Label value={...}>text</Label> or similar.
does not select the nested radio button.
Your Environment
Surface: v0.7.0
LiveView: v0.17.6
Elixir: v1.13.0 (compiled with Erlang/OTP 24)
Describe the bug
The Label component internally uses
input_id/2, neverinput_id/3. The generatedforattribute is never correct for a radio button or checkbox.As a workaround, I am currently doing
How to reproduce it
Clicking on the label text with this markup
There are probably also legitimate use cases where wrapping the around the input is not feasible, so it would be good to allow
<Label value={...}>text</Label>or similar.does not select the nested radio button.
Your Environment
Surface: v0.7.0
LiveView: v0.17.6
Elixir: v1.13.0 (compiled with Erlang/OTP 24)