| Index: third_party/polymer/v1_0/components-chromium/paper-checkbox/paper-checkbox-extracted.js
|
| diff --git a/third_party/polymer/v1_0/components-chromium/paper-checkbox/paper-checkbox-extracted.js b/third_party/polymer/v1_0/components-chromium/paper-checkbox/paper-checkbox-extracted.js
|
| index 7907d202250acd67a1bee45f8faf14b7fb8b6fe7..1c7fc9aec4d62e7a47aca4a4ef39e0681b922b0d 100644
|
| --- a/third_party/polymer/v1_0/components-chromium/paper-checkbox/paper-checkbox-extracted.js
|
| +++ b/third_party/polymer/v1_0/components-chromium/paper-checkbox/paper-checkbox-extracted.js
|
| @@ -1,5 +1,4 @@
|
| -
|
| - Polymer({
|
| +Polymer({
|
| is: 'paper-checkbox',
|
|
|
| behaviors: [
|
| @@ -47,11 +46,14 @@
|
| }
|
| },
|
|
|
| - ready: function() {
|
| - if (Polymer.dom(this).textContent == '') {
|
| + attached: function() {
|
| + var trimmedText = Polymer.dom(this).textContent.trim();
|
| + if (trimmedText === '') {
|
| this.$.checkboxLabel.hidden = true;
|
| - } else {
|
| - this.setAttribute('aria-label', Polymer.dom(this).textContent);
|
| + }
|
| + // Don't stomp over a user-set aria-label.
|
| + if (trimmedText !== '' && !this.getAttribute('aria-label')) {
|
| + this.setAttribute('aria-label', trimmedText);
|
| }
|
| this._isReady = true;
|
| },
|
| @@ -85,5 +87,4 @@
|
| }
|
| return '';
|
| }
|
| - })
|
| -
|
| + });
|
|
|