Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative text attribute not rendered on png icons #1531

Open
srchild opened this issue Oct 30, 2024 · 0 comments
Open

Alternative text attribute not rendered on png icons #1531

srchild opened this issue Oct 30, 2024 · 0 comments
Labels

Comments

@srchild
Copy link

srchild commented Oct 30, 2024

Bug Report

Prerequisites

  • [n/a ] Can you reproduce the problem on TYPO3 v11.5 LTS
    not tried

  • [n/a ] Can you reproduce the problem on TYPO3 v12.4 LTS
    not tried

  • [Y ] Can you reproduce the problem on TYPO3 v13.4 LTS
    Yes

  • [ Y] Did you perform a cursory search
    to see if your bug or enhancement is already reported?
    Yes

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

@srchild srchild added the bug label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant