The title attribute on the cx-media is not working

Discussão em 'Angular' iniciado por Yogesh, Abril 15, 2025.

  1. Yogesh

    Yogesh Guest

    Seems like there have been some changes to the cx-media in Spartacus 2211.25 due to which the "title" attribute in not working on cx-media. I have created a custom component by extending the ""ProductImageZoomProductImagesComponent" and have an alt and title attribute on cx-media on my custom component. Since upgrading to 2211.25 seems like the "title" attribute is being over-ridden by the "alt" attribute. While checking the OOTB code I realized that the cx-media has both "title" and "alt" set to the same "media.alt". Is there a way to change this so that I have a separate text for "alt" and separate text for "title".

    Here is the OOTB code.

    <img
    [loading]="loading"
    [alt]="media.alt"
    [title]="media.alt"
    [src]="media.src"
    [attr.role]="media.role"
    (load)="loadHandler()"
    (error)="errorHandler()"
    />

    Continue reading...

Compartilhe esta Página