Browse Source

Minor fix in tb-icon custom image feature - add alt attribute.

pull/13972/head
deaflynx 1 year ago
parent
commit
a4cf5f7d32
  1. 1
      ui-ngx/src/app/shared/components/icon.component.ts

1
ui-ngx/src/app/shared/components/icon.component.ts

@ -304,6 +304,7 @@ export class TbIconComponent extends _TbIconBase
imageUrl => {
const imgElement = this.renderer.createElement('img');
this.renderer.addClass(imgElement, 'mat-icon');
this.renderer.setAttribute(imgElement, 'alt', 'Image icon');
this.renderer.setAttribute(imgElement, 'src', imageUrl as string);
const elem: HTMLElement = this._elementRef.nativeElement;
this.renderer.insertBefore(elem, imgElement, this._iconNameContent.nativeElement);

Loading…
Cancel
Save