googlearchive / paper-radio-button

A radio button à la Material Design
11 stars 7 forks source link

Clicking on the label doesn't trigger the radio button #9

Open tjsavage opened 10 years ago

tjsavage commented 10 years ago

With a traditional <label for="myButton">My Label</label>, a click on the label would be the same as clicking on the radio button itself. Would this be possible for the label for <paper-radio-button label="My Label"></paper-radio-button>?

frankiefu commented 10 years ago

If you use the label in the paper-radio-button, clicking on the label should toggle the radio button. jsbin: http://jsbin.com/hanadixuludo/1/edit

Also after we implement core-label (https://github.com/Polymer/polymer/issues/793), one should be able to put label around the radio button and clicking on the label should also toggle the radio button.

<core-label>
  My Label
  <paper-radio-button></paper-radio-button>
</core-label>