[TYPO3-english] FAL: Required fields

Florian Seirer florian.seirer at tirol.gv.at
Mon Jul 14 11:58:46 CEST 2014


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, after 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)?

(This was originally postet on forge (https://forge.typo3.org/issues/60298), but the mailing list is probably a better place to ask.)


More information about the TYPO3-english mailing list