Bug #102796
closed
f:image would not add alt-text in alt-attribute of img-tag
Added by Dieter Dr. Porth 11 months ago.
Updated 10 months ago.
Description
The f:image Viewhelper disallow content in the alt-attribute.
Current Version TYPO3 11.5.33
See patch
Files
- Status changed from New to Needs Feedback
sorry for my missleading headline.
The image-viewhelper add everytime an empty(!) alt-attribute to the img-tag.
The if-condition is wrong and make thing going south. (see patch)
// The alt-attribute is mandatory to have valid html-code, therefore add it even if it is empty
if (empty($this->arguments['alt'])) {
$this->tag->addAttribute('alt', $image->hasProperty('alternative') ? $image->getProperty('alternative') : '');
}
The condition is correct. However, the code in the conditin block is wrong and may add a empty string if therr is also no alt description for the image.
Empty alt description attribute ahould be completly removed if empty.
- Assignee set to Stefan Bürk
Thanks for the feedback and sorry for the stolen time. You are right.
Please close this embarrassing ticket as quickly as possible. I had read something completely wrong.
- Status changed from Needs Feedback to Closed
Please close this embarrassing ticket as quickly as possible. I had read something completely wrong.
Closing this issue than as requested. If needed, it can be reopened if additional information occures.
Also available in: Atom
PDF