Skip to content

Commit f9475a4

Browse files
authored
Merge pull request #321 from youda97/tooltip-DAP
fix(tooltip): DAP violation
2 parents a828cdc + 9f11b6e commit f9475a4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dialog/tooltip/tooltip.directive.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ export class TooltipDirective extends DialogDirective {
5151
// tslint:disable-next-line:no-input-rename
5252
@Input("tooltip-type") tooltipType: "warning" | "error" | "" = "";
5353

54-
@HostBinding("attr.aria-describedby") descriptorId: string;
54+
@HostBinding("attr.aria-describedby") get descriptorId(): string {
55+
return this.expanded ? this.dialogConfig.compID : null;
56+
}
5557

5658
/**
5759
* Creates an instance of `TooltipDirective`.
@@ -73,6 +75,5 @@ export class TooltipDirective extends DialogDirective {
7375
this.dialogConfig.compID = "tooltip-" + TooltipDirective.tooltipCounter;
7476
this.dialogConfig.content = this.ibmTooltip;
7577
this.dialogConfig.type = this.tooltipType;
76-
this.descriptorId = this.dialogConfig.compID;
7778
}
7879
}

0 commit comments

Comments
 (0)