Partager le feedZback avec votre manager
-
- help
-
+ help
+
diff --git a/client/src/app/shared/dialog-tooltip/dialog-tooltip.directive.ts b/client/src/app/shared/dialog-tooltip/dialog-tooltip.directive.ts
index e1ac87c4..bdea0790 100644
--- a/client/src/app/shared/dialog-tooltip/dialog-tooltip.directive.ts
+++ b/client/src/app/shared/dialog-tooltip/dialog-tooltip.directive.ts
@@ -1,4 +1,4 @@
-import { Directive, TemplateRef, inject, input } from '@angular/core';
+import { Directive, ElementRef, TemplateRef, booleanAttribute, effect, inject, input } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { DialogTooltipComponent } from './dialog-tooltip.component';
import { DialogTooltipData } from './dialog-tooltip.types';
@@ -6,7 +6,6 @@ import { DialogTooltipData } from './dialog-tooltip.types';
@Directive({
selector: '[appDialogTooltip]',
host: {
- '[style.cursor]': '"pointer"',
'(click)': 'open($event)',
},
standalone: true,
@@ -18,8 +17,20 @@ export class DialogTooltipDirective {
dialogWidth = input();
+ ariaLabelFromDialogTitle = input(false, { transform: booleanAttribute });
+
private dialog = inject(MatDialog);
+ constructor() {
+ const { nativeElement } = inject>(ElementRef);
+ effect(() => {
+ if (!this.ariaLabelFromDialogTitle()) {
+ return;
+ }
+ nativeElement.ariaLabel = this.dialogTitle() ?? null;
+ });
+ }
+
open(event?: Event) {
event?.preventDefault();