Skip to main content
Participating Frequently
Jul 31, 2025 9:00 AM UTC
Answered

Read XMP AltTextAccessibility tag from links

Hi there,

 

is there any way to get the Iptc4xmpCore:AltTextAccessibility tag from a placed file using UXP script or ExtendScript?

The documentation under https://developer.adobe.com/xmp/docs/XMPNamespaces/Iptc4xmpCore/ does not even mention the tag.

Additionally I cannot declare any xmp objects because require("uxp").xmp is always undefined. Do I have to install anything? I tried UXP V. 7.4.2 (ID 2024 19.5.4) and UXP V. 8.1.6 (ID 2025 20.5)

Every hint is appreciated 🙂

Dirk BeckerCorrect answer
Legend
Aug 7, 2025 8:17 AM UTC

It just occured to me: when you write "UXP Script" do you mean an .idjs file?

Could be the problem. Try a UXP "plugin" before you rebuild the entire box.

 


After burning a few hours, I can confirm that UXPSCRIPT does not support xmp. At least for now (tried Version 20.3), I filed a bug on it. Digging further via a UXP plugin, with lots of try and error I could also list the language variants of that tag using uxp.xmp, while I haven't even tried to access them via InDesign's own methods (the linkXmp).

My conclusion: both InDesign and the uxp.xmp library still need plenty work. Leaving it at that, back to traditional plug-in programming …

12 replies

Legend
Jul 31, 2025 3:55 PM UTC

Something is wrong with your InDesign + UXP installation.

Using InDesign 20.3.1 for no specific reason,  I'm a bit slow with updates:

 

 ...

 

The document "last updated 26.7.2023" does not mention the tag, but according to another thread support was added to photography products only later in December 2023.

https://community.adobe.com/t5/lightroom-classic-ideas/p-support-for-new-iptc-accessibility-metadata/idc-p/12946693

 

When looking around in UXP I found much documentation is backed by github. According to the history there of your namespace document that July 2023 change was about broken links and the previous revision is from 2021. Explains the missing items.

https://github.com/AdobeDocs/xmp-docs/blob/main/src/pages/XMPNamespaces/Iptc4xmpCore/index.md

 

 

When you get xmp going in principle, I think there is another detail waiting for you - that tag may have language versions.

 

Happy programming!

Translate
Participating Frequently
Aug 1, 2025 7:08 AM UTC

Hi Dirk,

 

quote

Something is wrong with your InDesign + UXP installation.

Using InDesign 20.3.1 for no specific reason,  I'm a bit slow with updates:

 

Any ideas what's wrong with my UXP and how to fix it?

Like I mentioned I get the same error in both ID versions (on the same Mac). Like you I had 20.3.1 and updated to 20.5 hoping this would fix it.

 

quote

When you get xmp going in principle, I think there is another detail waiting for you - that tag may have language versions.

 

I was hoping it does. 🙂

To clarify my problem: I want to read the AltTextAccessibility tag and set the object export options. When I do it manually I only get the "x-default" value (or maybe the first language). I am planning a script that allows you to set the alt text by choosing the right language.

Translate
Legend
Aug 1, 2025 8:46 AM UTC

We're having another XMP discussion in parallel, plus one in the UXP centric creativeclouddeveloper.com forum.

https://community.adobe.com/t5/indesign-discussions/custom-xmp-metadata-not-showing-in-indesign-file-info-panel-using-uxp/m-p/15436477#M632247

https://forums.creativeclouddeveloper.com/t/is-there-any-manifest-permission-for-activedocument-filepath-in-indesign-uxp/11241

 

My conclusion: If you're within InDesign, prefer the proven InDesign methods.

 

Beyond that, I can only refer to the typical path when things go wrong:

 

Name your particular OS (you did not mention Mac or Windows, so I guess you're on Windows. I'm using Mac) . Are there admins around that locked/crippled it down with "enterprise" gradee security software, what used to be antivirus a decade ago. It might show a pattern when others come along for the same problem.

 

Then take the route with various degrees of reboot in safe mode, use another user account, reinstall, purge preferences, purge more preferences, cleaner script, try another machine with clean OS etc. Look around in other threads, there are lengthy FAQs.

 

Translate
rob day
Community Expert
Community Expert
Jul 31, 2025 1:51 PM UTC

Every hint is appreciated

 

Hi @Thorsten Kaltenborn , In ExtendScript a document has a MetadataPreferences object, which has setProperty and getProperty methods:

 

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#MetadataPreference.html

 

var md = app.activeDocument.metadataPreferences;
var ns = "http://ns.adobe.com/xap/1.0/"
var p = "documentWidth"
var v = "8.5"

md.setProperty(ns, p, v);
alert("This Document’s " + p +" property is set to: " + md.getProperty(ns, p))

 

Translate
Participating Frequently
Jul 31, 2025 1:54 PM UTC

Hi Rob,

 

thank you for your answer. But I need the XMP data of a link object. metadataPreferences is a property of the document object only.

Translate
rob day
Community Expert
Community Expert
Jul 31, 2025 2:38 PM UTC

With ExtendScript you can get the linkMetadata property from the link, but that is read only—there is getProperty but no setProperty. You might be able to do it by opening the link into Photshop with BridgeTalk and set the metadata property there.

 

Translate