I have an SXA Image component that is a link, but the title attribute value of the link is the image name.

I want to pass the link description to the title attribute using rendering variants. What i have enter image description here

And the result when hovering with the mouse is: enter image description here

Is the any way of having the link descripton instead of having the image name ?

For example:

enter image description here

enter image description here

Right now the Html result is this:

<div class="component-content">
 <a class="field-image"></a><a title="Image 11" 
  alt="" width="472" height="379" data-variantitemid="{E2A5B62B-C38B-4FF6- 
  948C-8243CE9E65AD}" data-variantfieldname="Image" style="margin: 0px 0px">
  • Try to set Alt field on Image. That should do the trick! Commented May 29, 2019 at 11:26
  • @PeterProcházka filling the Alternative Text field on image didn't made any change Commented May 29, 2019 at 11:31

1 Answer 1


You need to set the Alternate text on the Link field, not the image. The Link Description will set the text of the link if it has text, but you are using an image, so that will replace the text. The Title attribute is set by the Alternate text field:

Set the <code>Alternate text</code> field

  • That won't work either Commented Jun 3, 2019 at 9:04
  • This is not working , is there a workaround for this ? Commented Nov 12, 2019 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.