benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.
https://www.bootstrap-package.com/
MIT License
338 stars 205 forks source link

Alternative text attribute not rendered on png icons #1531

Open srchild opened 3 weeks ago

srchild commented 3 weeks ago

Bug Report

Prerequisites

Description

When using the 'Text and Icon' content element with an icon that is a png file, there is an option to enter accessibility information: Alternative text and Caption (and also download file name). When these fields are populated and saved in sys_file_metadata they are not rendered in the front end i.e. bug.

An alt attribute is recommended/required for images which give information rather than being purely decorative. Icons may be used as navigational pointers so I think it is correct to enable these attributes but it seems a bug that they are not rendered.

Also, there is no option to enter accessibility information when the icon file is from an iconset

Additionally, I notice that the icon img tag includes aria-hidden="true". But where an icon is used for informational purposes, e.g. as an indication of the content of the content element, that seems inappropriate and perhaps should be configurable rather than a fixed value.

Steps to Reproduce

  1. Starting from default bootstrap_package installation, change one of the text+icon elements on the home page to use a png icon.
  2. After saving the change, edit the icon tab of the element to access the Accessibility panel and add the Alternative text.
  3. Save and clear caches, then view the page.
  4. Inspect the source of the page and it is clear that there is no alt attribute rendered in the img tag

Expected behavior

The Alternative text entered in the backend should be rendered on the page in an alt attribute for the img tag.

Actual behavior

The img tag is rendered and the png icon displayed, but the img tag does not have an alt attribute

Screenshots

n/a

Versions

TYPO3 13.4.0 bootstrap_package 15.0.0