ALT text of item record file(s)?

I’m working on seeing how to improve the accessibility of a custom theme, and we’ve noticed that ExhibitBuilder does not always apply the newly implemented Appearance setting for the ALT text (example: the images embedded from the file-text layout type of an exhibit page). As a workaround, we were looking to apply the ALT text manually through the custom theme view files (if we can figure it out).

One way this is important is for linked images - the ALT text should not be a description of the image, it should be a description of the page/resource the website visitor will be sent to.

We did not see in the Developer Documentation how to retrieve the content of the individual file’s assigned ALT text field. We did see how to retrieve Dublin Core’s Title or Description fields, but not the file’s ALT Text. Is there a way to retrieve this from a property or method?

You can get the alt text for a file using metadata($file, 'alt_text') .

I’m not sure whether there’s a problem with the configured alt text getting used or just that you want to replace it in this context with something else. file-text, and the exhibit views generally, are set up to use the normal file display functions which should automatically be using the configured alt for a file. But it’s a different story if you want it to use something else, of course.