diff --git a/src/components/notification/notification.ts b/src/components/notification/notification.ts index 591856375d1..ac6fee64dea 100644 --- a/src/components/notification/notification.ts +++ b/src/components/notification/notification.ts @@ -128,6 +128,7 @@ export class SbbNotificationElement extends LitElement { public override connectedCallback(): void { super.connectedCallback(); + this.setAttribute('role', this.getAttribute('role') ?? 'status'); this._setInlineLinks(); } @@ -202,7 +203,6 @@ export class SbbNotificationElement extends LitElement { } protected override render(): TemplateResult { - setAttribute(this, 'role', 'status'); setAttribute(this, 'data-state', this._state); return html`