[FEATURE] ImageViewHelper removed title fallback onto alt tag
authorDaniel Hürtgen <huertgen@rheinschafe.de>
Tue, 30 Apr 2013 07:45:28 +0000 (09:45 +0200)
committerDaniel Hürtgen <daniel@higidi.de>
Tue, 7 May 2013 22:02:58 +0000 (00:02 +0200)
Currently the title tag is customizable but, if not set, the value
of the alt tag will be used. But sometimes you don't want to render
a title tag.

This patch removes the fallback onto the alt tag value and make the
title tag optional.

Releases: 6.2
Resolves: #47552
Change-Id: I7a2415422be3da2b9f81c7e29a4e96507a1ad69e
Reviewed-on: https://review.typo3.org/20347
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Daniel Hürtgen
Tested-by: Daniel Hürtgen
typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php

index e64e163..b018ada 100644 (file)
@@ -148,9 +148,6 @@ class ImageViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedV
                if (empty($this->arguments['alt'])) {
                        $this->tag->addAttribute('alt', '');
                }
-               if (empty($this->arguments['title']) && !empty($this->arguments['alt'])) {
-                       $this->tag->addAttribute('title', $this->arguments['alt']);
-               }
                return $this->tag->render();
        }
 
@@ -188,4 +185,4 @@ class ImageViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedV
        }
 }
 
-?>
\ No newline at end of file
+?>