File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import { BaseNotification } from "./base-notification.component";
3131 </svg>
3232 <div class="cds--actionable-notification__text-wrapper">
3333 <div class="cds--actionable-notification__content">
34- <div *ngIf="!notificationObj.template" cdsActionableTitle [innerHTML]="notificationObj.title"></div>
34+ <div *ngIf="!notificationObj.template" cdsActionableTitle [innerHTML]="notificationObj.title" [id]="notificationID" ></div>
3535 <div *ngIf="!notificationObj.template" cdsActionableSubtitle>
3636 <span [innerHTML]="notificationObj.message"></span>
3737 <ng-container *ngFor="let link of notificationObj.links">
@@ -83,7 +83,7 @@ export class ActionableNotification extends BaseNotification {
8383 }
8484
8585 @HostBinding ( "attr.id" ) notificationID = `notification-${ ActionableNotification . notificationCount } ` ;
86- @HostBinding ( "attr.aria-label " ) notificationLabel = `Notification` ;
86+ @HostBinding ( "attr.aria-labelledBy " ) notificationLabel = `Notification` ;
8787 @HostBinding ( "attr.aria-describedby" ) notificationDescription = `Notification-${ ActionableNotification . notificationCount ++ } ` ;
8888 @HostBinding ( "class.cds--actionable-notification" ) notificationClass = true ;
8989 @HostBinding ( "class.cds--actionable-notification--toast" ) get toastVariant ( ) { return this . notificationObj . variant === "toast" ; }
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import { BaseNotification } from "./base-notification.component";
2626 class="cds--inline-notification__icon">
2727 </svg>
2828 <div class="cds--inline-notification__text-wrapper">
29- <div *ngIf="!notificationObj.template" cdsNotificationTitle [innerHTML]="notificationObj.title"></div>
29+ <div *ngIf="!notificationObj.template" cdsNotificationTitle [innerHTML]="notificationObj.title" [id]="notificationID" ></div>
3030 <div *ngIf="!notificationObj.template" cdsNotificationSubtitle>
3131 <span [innerHTML]="notificationObj.message"></span>
3232 </div>
@@ -62,7 +62,9 @@ export class Notification extends BaseNotification {
6262 this . _notificationObj = Object . assign ( { } , this . defaultNotificationObj , obj ) ;
6363 }
6464
65- @HostBinding ( "attr.id" ) notificationID = `notification-${ Notification . notificationCount ++ } ` ;
65+ @HostBinding ( "attr.id" ) notificationID = `notification-${ Notification . notificationCount } ` ;
66+ @HostBinding ( "attr.aria-labelledBy" ) notificationLabel = `Notification` ;
67+ @HostBinding ( "attr.aria-describedby" ) notificationDescription = `Notification-${ Notification . notificationCount ++ } ` ;
6668 @HostBinding ( "class.cds--inline-notification" ) notificationClass = true ;
6769 @HostBinding ( "class.cds--inline-notification--error" ) get isError ( ) { return this . notificationObj . type === "error" ; }
6870 @HostBinding ( "class.cds--inline-notification--info" ) get isInfo ( ) { return this . notificationObj . type === "info" ; }
You can’t perform that action at this time.
0 commit comments