| Index: third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button-extracted.js
|
| diff --git a/third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button-extracted.js b/third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button-extracted.js
|
| index b2698d233e93948061d0c569c470ddc4da689d49..c04bcd6ad3142e1a3d9118018107a132765d6c46 100644
|
| --- a/third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button-extracted.js
|
| +++ b/third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button-extracted.js
|
| @@ -2,9 +2,13 @@
|
| Polymer({
|
| is: 'paper-icon-button',
|
|
|
| + hostAttributes: {
|
| + role: 'button',
|
| + tabindex: '0'
|
| + },
|
| +
|
| behaviors: [
|
| - Polymer.PaperButtonBehavior,
|
| - Polymer.PaperRadioButtonBehavior
|
| + Polymer.PaperInkyFocusBehavior
|
| ],
|
|
|
| properties: {
|
| @@ -23,6 +27,23 @@
|
| */
|
| icon: {
|
| type: String
|
| + },
|
| +
|
| + /**
|
| + * Specifies the alternate text for the button, for accessibility.
|
| + */
|
| + alt: {
|
| + type: String,
|
| + observer: "_altChanged"
|
| + }
|
| + },
|
| +
|
| + _altChanged: function(newValue, oldValue) {
|
| + var label = this.getAttribute('aria-label');
|
| +
|
| + // Don't stomp over a user-set aria-label.
|
| + if (!label || oldValue == label) {
|
| + this.setAttribute('aria-label', newValue);
|
| }
|
| }
|
| });
|
|
|