diff --git a/src/vaadin-button.html b/src/vaadin-button.html index 2ba883a..24c1b62 100644 --- a/src/vaadin-button.html +++ b/src/vaadin-button.html @@ -136,21 +136,6 @@ return '2.1.4'; } - static get properties() { - return { - /** - * Set the `aria-label` attribute for assistive technologies like - * screen readers. An `undefined` value for this property (the - * default) means that the `aria-label` attribute is not present at - * all. - */ - ariaLabel: { - type: String, - observer: '_ariaLabelChanged' - } - }; - } - ready() { super.ready(); @@ -162,7 +147,6 @@ this.$.button.setAttribute('role', 'presentation'); this._addActiveListeners(); - this._ariaLabelChanged(this.ariaLabel); } /** @@ -186,14 +170,6 @@ this.addEventListener('blur', () => this.removeAttribute('active')); } - _ariaLabelChanged(ariaLabel) { - if (ariaLabel !== undefined && ariaLabel !== null) { - this.$.button.setAttribute('aria-label', ariaLabel); - } else { - this.$.button.setAttribute('aria-label', this.innerText); - } - } - /** * @protected */ diff --git a/test/vaadin-button_test.html b/test/vaadin-button_test.html index bb237a4..0142c2d 100644 --- a/test/vaadin-button_test.html +++ b/test/vaadin-button_test.html @@ -129,19 +129,6 @@ vaadinButton.dispatchEvent(new CustomEvent('blur')); expect(vaadinButton.hasAttribute('active')).to.be.false; }); - - it('should set buttom text to native button aria-label', () => { - expect(nativeButton.hasAttribute('aria-label')).to.be.true; - // Remove extra line breaks - expect(nativeButton.getAttribute('aria-label').replace(/(\r\n|\n|\r)/gm, '')) - .to.contain(vaadinButton.innerText.replace(/(\r\n|\n|\r)/gm, '')); - }); - - it('should set button aria-label to native button aria-label', () => { - vaadinButton.ariaLabel = 'accessible'; - expect(nativeButton.hasAttribute('aria-label')).to.be.true; - expect(nativeButton.getAttribute('aria-label')).to.be.eql(vaadinButton.ariaLabel); - }); });