From 3bfe2b4e8cbd539f9b5a1d60e41a997c875a87b7 Mon Sep 17 00:00:00 2001 From: carmelotaverniti <117445050+carmelotaverniti@users.noreply.github.com> Date: Wed, 7 Feb 2024 20:47:15 +0100 Subject: [PATCH] fix(a11y): wai aria label for icon component --- .../src/lib/components/utils/icon/icon.component.html | 2 +- .../src/lib/components/utils/icon/icon.component.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/design-angular-kit/src/lib/components/utils/icon/icon.component.html b/projects/design-angular-kit/src/lib/components/utils/icon/icon.component.html index 0e0cd3a4..5ab34b18 100644 --- a/projects/design-angular-kit/src/lib/components/utils/icon/icon.component.html +++ b/projects/design-angular-kit/src/lib/components/utils/icon/icon.component.html @@ -1,3 +1,3 @@ - + diff --git a/projects/design-angular-kit/src/lib/components/utils/icon/icon.component.ts b/projects/design-angular-kit/src/lib/components/utils/icon/icon.component.ts index 32c19191..8ea88e80 100644 --- a/projects/design-angular-kit/src/lib/components/utils/icon/icon.component.ts +++ b/projects/design-angular-kit/src/lib/components/utils/icon/icon.component.ts @@ -71,6 +71,15 @@ export class ItIconComponent { */ protected assetBasePath: string; + /** + * Custom Waria label + */ + @Input() labelWaria: string | undefined; + + get isAriaHidden(): boolean { + return this.labelWaria == undefined; + } + constructor() { this.assetBasePath = inject(IT_ASSET_BASE_PATH); }