Copy link to clipboard
Copied
Hi everyone,
extracting Alt-Texts directly out of the Indesign-document would be great.
here is my exact Problem right now:
I have an older document, with about 200 pictures with Alt-Texts.
The Alt-Texts are unfortunately entered per hand with the Object-Export-Options in indesign, not in the Picture information itself.
Now we need only the Alt-Texts somehow extracted in a single Text-File or if possible a thumbnail of the pic with its Alt-Text beneath it.
Has anybody a solution for this Problem yet?
I would appreciate a good workflow or workaround without klicking every picture by hand and copy and paste the Text.
Thank you very much in advance
Nadine
OK, try this script:
https://indesignsecrets.com/how-to-install-scripts-in-indesign.php
So, basically, all you need is to open your InDesign document, then "open" (double-click) on my script.
It will go through all images in the document and get all Alt Text, then save them to the desktop txt file in the format:
IMAGE_NAME
ALT_TEXT
IMAGE_NAME
ALT_TEXT
...
Copy link to clipboard
Copied
So, basically you need to get the plain text out of InDesign, right?
How about this workflow: export to PDF file, then open PDF in Adobe Acrobat and resave as plain text
Alternatively, you should be able to open PDF file in Microsoft Word
Copy link to clipboard
Copied
This brings me just all the plain texts, and not the extracted ALT-texts from the images to the text document.
Even if it also would extract the alt-texts (but I didnāt see any of them in my first try ā did I do something wrong?) I would have to copy and paste the 200 snippets of alt-text out of that document, right? ā It would still be a first solution of the problem, of course.
Copy link to clipboard
Copied
Sorry, I probably misunderstood what alt-text is - I thought that was image captions
Can you clarify what you mean by "extracting alt-texts"? Maybe some screenshots?
UPD
Oh, now I understand what is alt texts... what you need probably can be done with custom InDesign script
Copy link to clipboard
Copied
OK, try this script:
https://indesignsecrets.com/how-to-install-scripts-in-indesign.php
So, basically, all you need is to open your InDesign document, then "open" (double-click) on my script.
It will go through all images in the document and get all Alt Text, then save them to the desktop txt file in the format:
IMAGE_NAME
ALT_TEXT
IMAGE_NAME
ALT_TEXT
...
Copy link to clipboard
Copied
Wow, this seems to work!
I tested it only on a small file yet, and will try the bigger one in the next days, because Iām not on my workstation right now.
Thank you very much for this script ā you are a lifesaver!
Best regards, happily,
Nadine
Copy link to clipboard
Copied
Hi,
Would there be a further script to re-import this file if you wanted to make changes? This would be a life saver!
Thanks
Copy link to clipboard
Copied
I realize this is old, but I just used it on a file in InDesign CC 2020 and it saved my life. Thank you!
Copy link to clipboard
Copied
Hi!
Above Script is not working in InDesign 17.4 with MacOS 12.6 ā any ideas what's changed?
Best regards,
Maarit
Copy link to clipboard
Copied
Great! it worked for me. Also is it possible to add page number?
Copy link to clipboard
Copied
William Campbell wrote a fantastic Links Report sscript that will provide the alt text, page number, and more.
https://www.marspremedia.com/software/indesign/#links-report
Copy link to clipboard
Copied
Hello,
This might not be possible but with the Export Alt Text Script above, can this be then reversed after?
After an Export, if I needed to change any of the alt text in the AltText.txt file then import it back to Indesign?
AltText-Export.jsx
//DESCRIPTION: This script will export all all text into single txt document on your desktop.
#target indesign
var images = app.activeDocument.allGraphics; // .itemLink.name
var altTextFilePath = "~/Desktop/AltText.txt";
var file = new File(altTextFilePath);
file.open('w');
for(var i=0; i < images.length; i++){
file.write( images.itemLink.name + "\n" + images.parent.objectExportOptions.customAltText + "\n\n" );
}
file.close();
alert('You can find "AltText.txt" file on your desktop', "Done");
Copy link to clipboard
Copied
Note that Alt-Text with Hyperlinks, new feature in InDesign 2020 version 15.0.0.155, is not supported by scripting.
It is also not supported with IDML or IDMS files.
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Note that Alt-Text with Hyperlinks, new feature in InDesign 2020 version 15.0.0.155, is not supported by scripting.
It is also not supported with IDML or IDMS files.
By @Laubender
Hi Uwe, do you know if this is still the case with CC2021, 2022?
Copy link to clipboard
Copied
Hyperlinks within Alt-Text is not supported by any standard or assistive technology. Within Alt-Text, the hyperlink is just plain readable text, and the hyperlink is not active nor clickable.
Instead, do you mean adding Alt-text on hyperlinks? That indeed is a new feature from 2020 onward, but it still is not exporting correctly to a PDF and, therefore, isn't worth setting at this time. It's a task you'll have to do manually in Acrobat Pro.
Note, however, that Alt-Text is NOT required for all hyperlinks. That's a misreading of the standards. Alt-Text is needed when hyperlinks are long and complex, or when it's not clear from the text of the hyperlink or the preceding body text the purpose of clicking the link (aka, where will the user end up if they clicked it).
The URL for this webpage is a good example of when Alt-Text is needed.
āBevi Chagnon
US Delegate to the ISO committees for PDF and PDF/UA accessibility, and former contributor to the WCAG web standards
Copy link to clipboard
Copied
I was refering to the new features of adding Alt-text on hyperlinks.
Thanks for the clarifiaction when it is required.
Copy link to clipboard
Copied
"Note that Alt-Text with Hyperlinks, new feature in InDesign 2020 version 15.0.0.155, is not supported by scripting.
It is also not supported with IDML or IDMS files."
Hi Jean-Claude,
still true with InDesign 2021 and 2022.
Regards,
Uwe Laubender
( ACP )