Skip to main content
Participating Frequently
February 27, 2025
Answered

How can I automate tagging content for PDF export in InDesign via Styles, Tags, and Structure?

  • February 27, 2025
  • 2 replies
  • 726 views

I'm in a bit of a pickle. I'm writing a big book of stories, adventure prompts, and optional rules for a popular board game. It's going to be offered as an untagged PDF, a hardcover book, or a softcover book. I'd like to include (as part of the digital PDF purchase) a tagged PDF. I'm just having trouble figuring out how to assign tags to different page elements.

 

Let me explain how I currently think it's supposed to work, based on what I've scoured from the Adobe InDesign User Guide, Adobe Acrobat User Guide, W3C and WCAG website, PDF Association website, Section 508 website, and ISO PDF 1.7 Specification documents. Then, please explain to me how I've gotten it wrong. I'm sure I have, I just don't know what.

  • The PDF 1.7 file type uses tags to help machines know how to convey different kinds of text (among other things) to readers. This is especially good for assistive technology, like screen readers for people who are blind or dyslexic.
  • I can add Tags in manually in Acrobat Pro after export from InDesign, or I can automate adding Tags pre-export in InDesign.
  • I can create "custom" tags for use in PDF and XML via the Tags panel. The standard PDF tags do not come pre-loaded, so I'll usually have to add any of those in by hand if I want to reference them.
  • I can tell InDesign which tags to add where by the following methods:
    • For paragraph styles, I can edit them one at a time in the Paragraph Style Options menu > Export Tagging > PDF > Tag: [choose only from P, H, H1 to H6, or Artifact]. I can also do many styles at once [choose only from custom tags I've added to the Tags panel] in the Paragraph Styles Panel > Edit All Export Tags menu, OR Tags Panel/Structure Window > Map Styles to Tags, OR Tags Panel/Structure Window > Map Tags to Styles.
    • For character styles, I can edit them individually or many at once in the same ways as the paragraph styles, EXCEPT that the Character Styles Panel > Edit All Export Tags menu only lets me do that for paragraph styles, not character styles.
    • For object styles, I can edit them one at a time through Object Style Options > Export Options > Tagged PDF > Apply Tag: [Choose from From Structure, Artifact, or Based on Object]. I can't edit more than one at once.
    • Table styles I can only assign tags to through the Tags Panel and Structure Window options. I can't edit them individually.
    • Cell styles are the same as Table styles - I can edit many at once, but not individually.
  • If I assign a tag to any style through the Tags Panel and Structure Window > Map Styles to Tags methods, but assign a different tag to that style through the Paragraph/Character Style Options > Export Tagging method, that second method's result takes priority.
  • If I want to really, really, properly control which tags go to which text, table, and cell styles, I should add all the standard PDF tags in manually through the Tags Panel, then use the Tags Panel > Map Styles to Tags method. Don't use the Paragraph/Character Style Options menu method, as it provides only a few of the dozens of tag options, and overrides whatever you do in the Tags Panel and Structure Window.
  • If I want to really control which tags go to which object styles, I'm out of luck. Object styles only map with any precision to "Artifact" or "From Structure," but I can't assign a tag to any object styles in general through the Structure Window. I can only add tags to individual objects in that window, not to a global style applied to all associated objects in the document.
  • Containers, blocks, and nesting tags all need to be curated by hand in the Structure Window or post-export in Acrobat. They can't be automated.
  • Alt text, actual text, and attributes all need to be curated by hand in the Structure Window or post-export in Acrobat. They can't be automated.

 

Does this sound correct to you guys? Or am I missing something? Whenever I ask the "computer people" in my life about PDF technicalities, their eyes glaze over as they realize they know almost nothing about such a universally relied-upon file type. My many attempts at googling solutions have resulted in almost nothing about how to integrate InDesign's tags into PDF-specific tags. They mostly talk about tags for EPUB, HTML, CSS, and XML, which I believe are similar to but different from the ones for PDF 1.7.

Correct answer Eugene Tyson

I might have some insights here

 

Review the list of standard PDF tags available in InDesign's Tags panel. Understand their semantic meaning (e.g., <P> for paragraph, <H1> for heading level 1, <Figure> for images, <Table> for tables, etc.).


Structure your InDesign document semantically. Use paragraph styles for different text types (body text, headings, captions, lists, etc.), object styles for consistent object formatting, and well-structured tables with header rows.


Tags Panel > Map Styles to Tags as your primary tagging method: Map your InDesign paragraph styles to the appropriate standard PDF tags (e.g., map your "Heading 1" paragraph style to <H1>, your "Body Text" style to <P>, your "Caption" style to <Caption>, etc.). For character styles, consider if they are truly semantically meaningful or purely stylistic. If semantic, map them to appropriate tags (e.g., <Emphasis> or <Strong>). If purely stylistic, they might not need tags.


For object styles, use Object Style Options > Export Options > Tagged PDF > Apply Tag: From Structure this ensures objects are included in the tagged structure.


Use the Structure Pane to review and refine the tag structure, especially for complex layouts, objects, figures, and tables. Manually tag objects or groups as needed in the Structure Pane. Add meaningful alt text to figures and images in the Structure Pane (Object Export Options > Alt Text).


Test, Test, Test: Export a tagged PDF and test it thoroughly with a screen reader and the PAC tool. Iterate and refine your tagging based on testing results.

 

For your book project, you can automate a large portion of the tagging process. Remember to test your tagged PDF with assistive technology to ensure it meets accessibility standards.

 

Let us know if you need more info - I'm be no means an Accessiblity Expert or anything like that but did a few projects years and years ago, so my memory may be foggy.

2 replies

Dave Creamer of IDEAS
Community Expert
Community Expert
March 9, 2025

This is one of the best books out there for getting a properly Accessible PDF:

https://www.pubcom.com/books/bevi_508-indesign/508indesign.shtml

 

You can also search this forum for the author, Bevi Chagnon, for her many posts about accessibility. 

 

 

David Creamer: Community Expert (ACI and ACE 1995-2023)
Eugene TysonCommunity ExpertCorrect answer
Community Expert
March 8, 2025

I might have some insights here

 

Review the list of standard PDF tags available in InDesign's Tags panel. Understand their semantic meaning (e.g., <P> for paragraph, <H1> for heading level 1, <Figure> for images, <Table> for tables, etc.).


Structure your InDesign document semantically. Use paragraph styles for different text types (body text, headings, captions, lists, etc.), object styles for consistent object formatting, and well-structured tables with header rows.


Tags Panel > Map Styles to Tags as your primary tagging method: Map your InDesign paragraph styles to the appropriate standard PDF tags (e.g., map your "Heading 1" paragraph style to <H1>, your "Body Text" style to <P>, your "Caption" style to <Caption>, etc.). For character styles, consider if they are truly semantically meaningful or purely stylistic. If semantic, map them to appropriate tags (e.g., <Emphasis> or <Strong>). If purely stylistic, they might not need tags.


For object styles, use Object Style Options > Export Options > Tagged PDF > Apply Tag: From Structure this ensures objects are included in the tagged structure.


Use the Structure Pane to review and refine the tag structure, especially for complex layouts, objects, figures, and tables. Manually tag objects or groups as needed in the Structure Pane. Add meaningful alt text to figures and images in the Structure Pane (Object Export Options > Alt Text).


Test, Test, Test: Export a tagged PDF and test it thoroughly with a screen reader and the PAC tool. Iterate and refine your tagging based on testing results.

 

For your book project, you can automate a large portion of the tagging process. Remember to test your tagged PDF with assistive technology to ensure it meets accessibility standards.

 

Let us know if you need more info - I'm be no means an Accessiblity Expert or anything like that but did a few projects years and years ago, so my memory may be foggy.

Participating Frequently
March 9, 2025

As I said in my other question you responded to, Eugene, you are a godsend.

 

So it sounds like I have it at least mostly correct.

 

InDesign's Tags panel has no built-in, preloaded default options except Root. Even though P, Hn, and Artifact are built in to the Paragraph styles system. My tests so far show that's inconvenient but not awful - I can add in custom tags here that get mapped automatically to P, Hn, and Artifact (even if the tag is a standard PDF 1.7 tag other than those, like Lbl or BlockQuote). Then for the ones that got mapped incorrectly, I can fix those en masse in Acrobat.

 

For tags that need to be nested properly, I'm out of luck. Those can only be properly arranged manually, whether it be in InDesign or Acrobat. Although by using those custom InDesign tags I can reconfigure in Acrobat, I MIGHT be able to set it up so they're easy to reassign to the proper PDF 1.7 tags after export, if I manually nest them properly in InDesign using stand-in tags. But that manual part will take a long time.

 

By extension, lists will be time consuming to properly implement L, Lbl, and LI.

 

Also by extension, tables aren't worth the trouble to figure out. That's even more complicated nesting than lists require, and InDesign doesn't offer any even partially automated tagging of tables, cells, table styles, or cell styles.

 

For tagged objects that need anything other than Artifact (such as Figure, or the AltText attribute), I'm also out of luck. Those can only be configured one at a time. (Thankfully, my book has very few of those, but future books like this will have lots).

 

Oh, and for reference, when I talk about "time consuming," this book's word count is almost exactly three times the length of the first Harry Potter book. It's a chonker.