Project

General

Profile

Actions

Feature #60298

closed

Required fields for alttext etc. in FAL

Added by Florian Seirer almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2014-07-14
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

As a government agency we are bound by accessibility laws to make sure every image on our websites has an alternative text.
Of course, you can make certain fields mandatory with code like this in /typo3conf/extTables.php:

$TCA['sys_file_metadata']['columns']['alternative']['config']['eval'] = 'required';

This only helps when you edit files. And knowing my editors they rarely do this.
But this has no impact on adding images to a tt_content record. You can easily use an image without alternative text in a gallery.

Now, adding

$TCA['sys_file_reference']['columns']['alternative']['config']['eval'] = 'required';

to extTables.php an editor can only save a tt_content record if the alternative text is filled out. But then the editor can't reuse the text he entered in the file record.

Is there a way to make make sure a tt_content record with images can only be saved if either the alttext has been filled out in the metadata table, or is overwritten with another text in the reference table?
Any ideas? Or is this not possible (yet)?

Actions

Also available in: Atom PDF