From 35f24c989607169246c37900d92a98b3069c6f14 Mon Sep 17 00:00:00 2001 From: Rob Dodson Date: Thu, 22 Jun 2017 16:30:14 -0700 Subject: [PATCH 1/4] Pipe label through to aria-labels --- paper-input-behavior.html | 18 ------------------ paper-input.html | 6 +++--- paper-textarea.html | 13 ++----------- 3 files changed, 5 insertions(+), 32 deletions(-) diff --git a/paper-input-behavior.html b/paper-input-behavior.html index b7c912ee..c6f8e86c 100644 --- a/paper-input-behavior.html +++ b/paper-input-behavior.html @@ -397,8 +397,6 @@ }, attached: function() { - this._updateAriaLabelledBy(); - // In the 2.0 version of the element, this is handled in `onIronInputReady`, // i.e. after the native input has finished distributing. In the 1.0 version, // the input is in the shadow tree, so it's already available. @@ -498,22 +496,6 @@ return placeholder || alwaysFloatLabel; }, - _updateAriaLabelledBy: function() { - var label = Polymer.dom(this.root).querySelector('label'); - if (!label) { - this._ariaLabelledBy = ''; - return; - } - var labelledBy; - if (label.id) { - labelledBy = label.id; - } else { - labelledBy = 'paper-input-label-' + Polymer.PaperInputHelper.NextLabelID++; - label.id = labelledBy; - } - this._ariaLabelledBy = labelledBy; - }, - _onChange:function(event) { // In the Shadow DOM, the `change` event is not leaked into the // ancestor tree, so we must do this manually. diff --git a/paper-input.html b/paper-input.html index 535cfa96..eaff2a16 100644 --- a/paper-input.html +++ b/paper-input.html @@ -145,7 +145,7 @@ - + @@ -168,7 +168,7 @@ -->