Skip to content

Commit

Permalink
style: format
Browse files Browse the repository at this point in the history
  • Loading branch information
felixw committed Oct 20, 2023
1 parent 49c7cb2 commit a848629
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/components/src/components/notification/notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class Notification {
/** @deprecated - ariaRole should replace innerAriaLive */
@Prop() innerAriaLive?: string = 'assertive';
/** (optional) string prepended to the heading */
@Prop() innerRole?: 'alert' | 'status' = 'alert';
@Prop() innerRole?: 'alert' | 'status' = 'alert';
/** (optional) Label for close button */
@Prop() closeButtonLabel?: string = 'Close';
/** (optional) `title` for close button */
Expand Down Expand Up @@ -93,7 +93,11 @@ export class Notification {

connectedCallback() {
if (this.hostElement.hasAttribute('opened')) {
if (this.innerAriaLive === 'polite' || this.innerRole === undefined || this.innerRole === 'status') {
if (
this.innerAriaLive === 'polite' ||
this.innerRole === undefined ||
this.innerRole === 'status'
) {
this.innerRole = 'status';
}
this.isOpen = true;
Expand Down Expand Up @@ -173,9 +177,7 @@ export class Notification {
<IconTag size={ICON_SIZE} selected={this.type === 'toast'} />
</slot>
</div>
<div
part="body"
>
<div part="body">
<div
part="heading"
role="heading"
Expand Down

0 comments on commit a848629

Please sign in to comment.