OLD | NEW |
1 | 1 |
2 | 2 |
3 Polymer('paper-radio-button', { | 3 Polymer('paper-radio-button', { |
4 | 4 |
5 /** | 5 /** |
6 * Fired when the checked state changes due to user interaction. | 6 * Fired when the checked state changes due to user interaction. |
7 * | 7 * |
8 * @event change | 8 * @event change |
9 */ | 9 */ |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 if (this.checked !== old) { | 67 if (this.checked !== old) { |
68 this.fire('change'); | 68 this.fire('change'); |
69 } | 69 } |
70 }, | 70 }, |
71 | 71 |
72 toggle: function() { | 72 toggle: function() { |
73 this.checked = !this.toggles || !this.checked; | 73 this.checked = !this.toggles || !this.checked; |
74 }, | 74 }, |
75 | 75 |
76 checkedChanged: function() { | 76 checkedChanged: function() { |
77 this.$.onRadio.classList.toggle('fill', this.checked); | 77 this.setAttribute('aria-checked', this.checked ? 'true' : 'false'); |
78 this.setAttribute('aria-checked', this.checked ? 'true': 'false'); | |
79 this.fire('core-change'); | 78 this.fire('core-change'); |
80 }, | 79 }, |
81 | 80 |
82 labelChanged: function() { | 81 labelChanged: function() { |
83 this.setAttribute('aria-label', this.label); | 82 this.setAttribute('aria-label', this.label); |
84 } | 83 } |
85 | 84 |
86 }); | 85 }); |
87 | 86 |
OLD | NEW |