From b01f086ffa2f9e7d15a1733a69447b661b982e1d Mon Sep 17 00:00:00 2001 From: Marco D'Auria Date: Mon, 15 Jan 2024 10:51:05 +0100 Subject: [PATCH] fix: review --- src/components/notification/notification.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/notification/notification.ts b/src/components/notification/notification.ts index b98c6618473..11434bd5b0e 100644 --- a/src/components/notification/notification.ts +++ b/src/components/notification/notification.ts @@ -130,6 +130,7 @@ export class SbbNotificationElement extends LitElement { public override connectedCallback(): void { super.connectedCallback(); + this.setAttribute('role', this.getAttribute('role') ?? 'status'); this._handlerRepository.connect(); this._setInlineLinks(); } @@ -202,7 +203,6 @@ export class SbbNotificationElement extends LitElement { protected override render(): TemplateResult { const hasTitle = !!this.titleContent || this._namedSlots['title']; - setAttribute(this, 'role', 'status'); setAttribute(this, 'data-state', this._state); setAttribute(this, 'data-has-title', hasTitle);