diff --git a/client/src/app/demo/dialog-tooltip-demo/dialog-tooltip-demo.component.html b/client/src/app/demo/dialog-tooltip-demo/dialog-tooltip-demo.component.html index d95624c1..b9b4bd6c 100644 --- a/client/src/app/demo/dialog-tooltip-demo/dialog-tooltip-demo.component.html +++ b/client/src/app/demo/dialog-tooltip-demo/dialog-tooltip-demo.component.html @@ -1,21 +1,34 @@

- Open dialog tooltip with content as string - - lightbulb - + lightbulb +

- Open dialog tooltip with content as template - lightbulb + Open dialog tooltip using content as template + + - beach_access + beach_access Dialog content as template.

diff --git a/client/src/app/give-feedback/give-feedback/give-feedback.component.html b/client/src/app/give-feedback/give-feedback/give-feedback.component.html index 4d7a7a43..d6e73a7c 100644 --- a/client/src/app/give-feedback/give-feedback/give-feedback.component.html +++ b/client/src/app/give-feedback/give-feedback/give-feedback.component.html @@ -52,17 +52,20 @@

Partager le feedZback avec le manager de votre collègue - - help - + help + diff --git a/client/src/app/give-feedback/give-requested-feedback/give-requested-feedback.component.html b/client/src/app/give-feedback/give-requested-feedback/give-requested-feedback.component.html index 7f15b4d0..6eb329de 100644 --- a/client/src/app/give-feedback/give-requested-feedback/give-requested-feedback.component.html +++ b/client/src/app/give-feedback/give-requested-feedback/give-requested-feedback.component.html @@ -15,17 +15,19 @@

Notez que votre réponse sera partagée avec son manager. - - help - + help + } diff --git a/client/src/app/request-feedback/request-feedback.component.html b/client/src/app/request-feedback/request-feedback.component.html index 007485fe..e45cad11 100644 --- a/client/src/app/request-feedback/request-feedback.component.html +++ b/client/src/app/request-feedback/request-feedback.component.html @@ -87,17 +87,19 @@

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();