Bug #60502

CSS Styled Content may render duplicate image attribute "title"

Added by Markus no-lastname-given over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2014-07-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If you add an image to an Image-CE, you may add a title which is rendered as title attribute in the output.

If you additionally add a link to the image and add a title for that as well (I attached an example), the default Typoscript setting of "styles.content.imgtext.titleInLink = 1" will result in a duplicate title on the rendered link:

<a href="http://www.google.de" title="LINKTITLE" target="_blank" title="TITLE"><img src="/fileadmin/user_upload/dummy220.png" width="220" height="166"  alt="ALT"></a>

Files

duplicate_title.png (54.2 KB) duplicate_title.png Markus no-lastname-given, 2014-07-23 16:16
#1

Updated by Riccardo De Contardi about 6 years ago

Tested with TYPO3 6.2.9:

1) add an image CE
1.1) add Title attribute "IMAGETITLE" to the image
1.2) result:

<img width="600" height="450" title="IMAGETITLE" alt="" src="fileadmin/images/dummy.png">

=>OK

2) add a link to the image
2.1) result:

<a title="IMAGETITLE" href="index.php?id=3">
  <img width="600" height="450" alt="" src="fileadmin/images/dummy.png">
</a>

=>THE TITLE ATTRIBUTE HAS BEEN MOVED TO THE ANCHOR!!

3) add a title attribute "LINKTITLE to the link
3.1) result:

<a title="LINKTITLE" href="index.php?id=3">
  <img width="600" height="450" alt="" src="fileadmin/images/dummy.png">
</a>

=>NO DUPLICATED ATTRIBUTE, BUT THE LINK TITLE HAS OVERRIDDEN THE PREVIOUS ONE

#2

Updated by Markus Klein about 6 years ago

  • Status changed from New to Closed

Thanks for testing this. That's the expected behaviour.
The bug is therefore only present in 6.1, which is not supported anymore.
Closing this issue.

#3

Updated by Riccardo De Contardi about 6 years ago

Thank you. I have not checked but IMHO if it is the expected behavior it should be described in some documentation, as (IMHO again) it is not much intuitive.
Thank you for your attention and best regards

#4

Updated by Markus Klein about 6 years ago

Well, no idea which documentation would be the right place. But what else would you suggest? Having a title on the link and the image would always hide the one from the image.

#5

Updated by Riccardo De Contardi about 6 years ago

you are right, the only thing I was thinking of is that if someone adds an attribute to a tag, he/she could find a bit "weird" to see it applied to another, that's all ;)

Also available in: Atom PDF