Skip to content

Commit

Permalink
fix: risolto il bag di accessibilità sul componente it-icon
Browse files Browse the repository at this point in the history
  • Loading branch information
carmelotaverniti committed Feb 6, 2024
1 parent 072df92 commit 88153d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<svg [class]="iconClass">
<svg [attr.aria-hidden]="isAriaHidden" [attr.aria-label]="labelWaria" [class]="iconClass">
<use [attr.href]="iconHref" [attr.xlink:href]="iconHref"></use>
</svg>
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 88153d3

Please sign in to comment.