From 999fdc025c040ffcd3b174ff7285007e3c5dc20c Mon Sep 17 00:00:00 2001
From: Oliver Klee <typo3-coding@oliverklee.de>
Date: Tue, 14 Apr 2020 17:30:10 +0200
Subject: [PATCH] [BUGFIX] Use empty alt text for EM extension icons
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

For images that cannot be loaded (e.g., when the extension is outside
the document root), the extension name will be printed twice, which
looks ugly and also breaks the layout.

As the extension icon is purely decorative, the alt attribute should
be an empty string.

Resolves: #91031
Releases: master, 9.5
Change-Id: I71be7978cc3245f127d864586dd5d54c1a6aae10
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64167
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Björn Jacob <bjoern.jacob@tritum.de>
Tested-by: Christian Eßl <indy.essl@gmail.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Josef Glatz <josefglatz@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Björn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Christian Eßl <indy.essl@gmail.com>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Josef Glatz <josefglatz@gmail.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
---
 .../Resources/Private/Templates/Distribution/Show.html          | 2 +-
 .../Resources/Private/Templates/List/Index.html                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/typo3/sysext/extensionmanager/Resources/Private/Templates/Distribution/Show.html b/typo3/sysext/extensionmanager/Resources/Private/Templates/Distribution/Show.html
index 006a3416476e..19c65fbb2b4c 100644
--- a/typo3/sysext/extensionmanager/Resources/Private/Templates/Distribution/Show.html
+++ b/typo3/sysext/extensionmanager/Resources/Private/Templates/Distribution/Show.html
@@ -4,7 +4,7 @@
 
     <div class="distribution-detail">
         <div class="distribution-detail-previewpane">
-            <em:distributionImage extensionkey="{extension.extensionKey}" alt="{extension.title}" height="225" width="300" />
+            <em:distributionImage extensionkey="{extension.extensionKey}" alt="" height="225" width="300" />
         </div>
         <div class="distribution-detail-body">
             <div class="distribution-detail-header">
diff --git a/typo3/sysext/extensionmanager/Resources/Private/Templates/List/Index.html b/typo3/sysext/extensionmanager/Resources/Private/Templates/List/Index.html
index 17a9babbe2f4..5bdcdac7b09d 100644
--- a/typo3/sysext/extensionmanager/Resources/Private/Templates/List/Index.html
+++ b/typo3/sysext/extensionmanager/Resources/Private/Templates/List/Index.html
@@ -96,7 +96,7 @@
                     </td>
                     <td>
                         <f:if condition="{extension.icon}">
-                            <img class="extension-icon" src="{extension.icon}" alt="{extension.title}" />
+                            <img class="extension-icon" src="{extension.icon}" alt="" />
                         </f:if>
                         <span title="{extension.description}">{extension.title}</span>
                     </td>
-- 
GitLab