Review main Merged

91031[BUGFIX] Allow alternative text for all file types

Oli Bartsch CR +2 V +2 Easy +5 −5 updated 10/15/25, 07:37

Commit message

Alternative text is essential for accessibility
compliance and is required by various regulations
(e.g., WCAG 2.1, EU Accessibility Act, Section 508)
for non-text content including e.g. PDF documents.
When such PDFs are displayed as preview images in
the frontend (e.g., using <f:media>), the alternative
text field must be available to provide proper
accessibility information.

Since this might be needed for other file types
as well and there is no reason why this field
should be hidden anyways, it is now displayed
for all file types.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Josef Glatz +1
    • Garvin Hicking +1
    • Josua Vogel +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Josef Glatz +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1315

  1. Oli Bartsch uploaded patch set 1 10/13/25, 19:13

  2. core-ci voted on patch set 1 V +1 10/13/25, 19:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86574

  3. Garvin Hicking commented on patch set 1 10/13/25, 19:41

    DisplayConditions.php:31

    I think this could get an important rst so it can be added to documentation and referred to?

    sys_file_metadata.php:107

    I think this should allow also: application/postscript application/vnd.adobe.illustrator application/msword, application/vnd.openxmlformats-officedocument..... Thinking about this. Why not have alternative available always? Does it hurt?
  4. Oli Bartsch commented on patch set 1 10/13/25, 20:56

    DisplayConditions.php:31 Reply

    No, because this is internal.

    sys_file_metadata.php:107 Reply

    Does ImageService really render a preview image for those types?
  5. Garvin Hicking commented on patch set 1 10/13/25, 21:22

    sys_file_metadata.php:107 Reply

    I think this would technically be possible. but have not verified. I just think having alt everyhwere could be helpful and precents an IMO complicated displaycond.
  6. Josef Glatz commented on patch set 1 10/14/25, 05:34

    Aside from the important RsT: I hope I'm in the right context, but having the alternative field for every file makes it possible to not only use an alt attribute on an IMG tag but also using that maintained field for other a11y attributes? e.g.: download button for word document where the alternative text is used for an aria-label attribute?
  7. Oli Bartsch uploaded patch set 2 V +1 10/14/25, 08:08

  8. Oli Bartsch commented on patch set 2 10/14/25, 08:09

    Reply

    Good idea.

    sys_file_metadata.php:107 Reply

    All right, I changed the patch to display the field for all types, see Josef's comment.
  9. core-ci voted on patch set 2 V +1 10/14/25, 08:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86604

  10. Garvin Hicking voted on patch set 2 CR +1 V +1 10/14/25, 08:51

  11. Josef Glatz voted on patch set 2 CR +1 V +1 10/14/25, 14:00

  12. Josef Glatz commented on patch set 2 10/15/25, 05:05

    patch also successfully tested in v13
  13. Josua Vogel voted on patch set 2 CR +1 10/15/25, 06:31

  14. Oli Bartsch voted on patch set 2 CR +2 V +2 10/15/25, 07:37

  15. Oli Bartsch merged patch set 3 10/15/25, 07:37