From ffebe4a9c84684db1cd2a89572ad23cbc9a4065d Mon Sep 17 00:00:00 2001 From: Willi Wehmeier <wwwehmeier@gmail.com> Date: Thu, 14 Mar 2024 12:12:05 +0100 Subject: [PATCH] [TASK] Set empty alt text for file reference thumbnails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The thumbnail images in the inline file relations have the properties alt and title set to "id=x" which is only helpful when used to show the record uid in the tooltip. For screenreader users the info in the alt attribute isn't helpful at all. That's why the alt text should be empty so the thumbnail doesn't get read out by screenreaders at all. Resolves: #103397 Releases: main, 12.4 Change-Id: I233a54705c9c81e31b8852a8454165593fa8e061 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83467 Reviewed-by: Jasmina Ließmann <minapokhalo+typo3@gmail.com> Tested-by: Jasmina Ließmann <minapokhalo+typo3@gmail.com> Tested-by: Oliver Bartsch <bo@cedev.de> Tested-by: core-ci <typo3@b13.com> Reviewed-by: Andreas Kienast <a.fernandez@scripting-base.de> Reviewed-by: Oliver Bartsch <bo@cedev.de> --- .../backend/Classes/Form/Container/FileReferenceContainer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/backend/Classes/Form/Container/FileReferenceContainer.php b/typo3/sysext/backend/Classes/Form/Container/FileReferenceContainer.php index 6af361443787..954920097192 100644 --- a/typo3/sysext/backend/Classes/Form/Container/FileReferenceContainer.php +++ b/typo3/sysext/backend/Classes/Form/Container/FileReferenceContainer.php @@ -251,7 +251,7 @@ class FileReferenceContainer extends AbstractContainer $thumbnail = '<img src="' . htmlspecialchars($imageUrl) . '" ' . 'width="' . $processedImage->getProperty('width') . '" ' . 'height="' . $processedImage->getProperty('height') . '" ' . - 'alt="' . $altText . '" ' . + 'alt="" ' . 'title="' . $altText . '" ' . 'loading="lazy">'; } -- GitLab