From 166427871d90b8ae478924f1685249d92c1c0f82 Mon Sep 17 00:00:00 2001 From: Wessel Loth Date: Thu, 13 Feb 2020 15:38:29 +0100 Subject: [PATCH] fix(button): ie11 error when setting attribute in constructor --- packages/button/src/LionButton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/button/src/LionButton.js b/packages/button/src/LionButton.js index d19c09c43..c49cf2807 100644 --- a/packages/button/src/LionButton.js +++ b/packages/button/src/LionButton.js @@ -162,7 +162,7 @@ export class LionButton extends DisabledWithTabIndexMixin(SlotMixin(LitElement)) this._buttonId = `button-${Math.random() .toString(36) .substr(2, 10)}`; - this.setAttribute('aria-labelledby', this._buttonId); + this.updateComplete.then(() => this.setAttribute('aria-labelledby', this._buttonId)); } }