| OLD | NEW |
| 1 | 1 |
| 2 Polymer({ | 2 Polymer({ |
| 3 is: 'paper-icon-button', | 3 is: 'paper-icon-button', |
| 4 | 4 |
| 5 hostAttributes: { |
| 6 role: 'button', |
| 7 tabindex: '0' |
| 8 }, |
| 9 |
| 5 behaviors: [ | 10 behaviors: [ |
| 6 Polymer.PaperButtonBehavior, | 11 Polymer.PaperInkyFocusBehavior |
| 7 Polymer.PaperRadioButtonBehavior | |
| 8 ], | 12 ], |
| 9 | 13 |
| 10 properties: { | 14 properties: { |
| 11 /** | 15 /** |
| 12 * The URL of an image for the icon. If the src property is specified, | 16 * The URL of an image for the icon. If the src property is specified, |
| 13 * the icon property should not be. | 17 * the icon property should not be. |
| 14 */ | 18 */ |
| 15 src: { | 19 src: { |
| 16 type: String | 20 type: String |
| 17 }, | 21 }, |
| 18 | 22 |
| 19 /** | 23 /** |
| 20 * Specifies the icon name or index in the set of icons available in | 24 * Specifies the icon name or index in the set of icons available in |
| 21 * the icon's icon set. If the icon property is specified, | 25 * the icon's icon set. If the icon property is specified, |
| 22 * the src property should not be. | 26 * the src property should not be. |
| 23 */ | 27 */ |
| 24 icon: { | 28 icon: { |
| 25 type: String | 29 type: String |
| 30 }, |
| 31 |
| 32 /** |
| 33 * Specifies the alternate text for the button, for accessibility. |
| 34 */ |
| 35 alt: { |
| 36 type: String, |
| 37 observer: "_altChanged" |
| 38 } |
| 39 }, |
| 40 |
| 41 _altChanged: function(newValue, oldValue) { |
| 42 var label = this.getAttribute('aria-label'); |
| 43 |
| 44 // Don't stomp over a user-set aria-label. |
| 45 if (!label || oldValue == label) { |
| 46 this.setAttribute('aria-label', newValue); |
| 26 } | 47 } |
| 27 } | 48 } |
| 28 }); | 49 }); |
| OLD | NEW |