Skip to content

Commit

Permalink
[TASK] Set empty alt text for file reference thumbnails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
whmyr authored and o-ba committed Mar 14, 2024
1 parent 5cc1b76 commit ffebe4a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -251,7 +251,7 @@ protected function renderFileHeader(string $ariaAttributesString): string
$thumbnail = '<img src="' . htmlspecialchars($imageUrl) . '" ' .
'width="' . $processedImage->getProperty('width') . '" ' .
'height="' . $processedImage->getProperty('height') . '" ' .
'alt="' . $altText . '" ' .
'alt="" ' .
'title="' . $altText . '" ' .
'loading="lazy">';
}
Expand Down

0 comments on commit ffebe4a

Please sign in to comment.