Open kenmoore opened 10 years ago
I agree this feels inconsistent. Since the paper-radio-button
is meant to mimic <input type="radio">
behavior, I would stay away from letting paper-radio-button
have children. I would change the second half of your proposal to the following:
<paper-radio-group selected="small">
<paper-radio-button value="small” label="Small is good for baby bear">
<paper-radio-button value="medium” label="Medium is just right">
<paper-radio-button value="large” label="Large is good for papa bear">
</paper-radio-group>
As documented, the 'selected' attribute of paper-radio-button keys off of the 'name' attribute of the child paper-radio-buttons. This design has issues:
But I see the argument for inconsistency: in a paper-dropdown-menu the items are not likely to be extremely long, whereas paper-radio-button items may be full sentences (or more), which would be cumbersome for setting the selection.
Looking at the elements side-by-side, I find it unsettling how structurally similar, but syntactically different they are:
Here's how they might look:
In addition to providing high consistency, this proposal:
Thoughts?