diff --git a/src/components/notification/notification.ts b/src/components/notification/notification.ts index ac6fee64dea..b18a64bb739 100644 --- a/src/components/notification/notification.ts +++ b/src/components/notification/notification.ts @@ -128,7 +128,7 @@ export class SbbNotificationElement extends LitElement { public override connectedCallback(): void { super.connectedCallback(); - this.setAttribute('role', this.getAttribute('role') ?? 'status'); + // this.setAttribute('role', this.getAttribute('role') ?? 'status'); this._setInlineLinks(); } @@ -141,6 +141,9 @@ export class SbbNotificationElement extends LitElement { await this.updateComplete; this._setNotificationHeight(); this._open(); + this.shadowRoot + .querySelector('.sbb-notification') + .setAttribute('role', this.getAttribute('role') ?? 'status'); } public override disconnectedCallback(): void {