What are PDF tags?

Tags are the basis for accessibility within a PDF. Without proper tags there is no accessibility. Tag elements provide semantic information for screen readers, control the reading order, and other important functions. An important first step is to determine if your PDF has tags. Review this post to find out if your document has tags.

Video Guide

Why do PDF tags matter?

Assistive technology will read tags and use them as a method for navigating larger documents. A tagged PDF is essential for those with visual disabilities and anyone who is using assistive technology like JAWS or NVDA.

PDF tags make it possible to identify content like headings, lists, links, tables, forms, and other important features. Not all programs can export a tagged PDF – so make sure you are using the right tools!

Sample screenshot of tags panel

Sample screenshot of the tags panel

Tag Relationships

Tags come in a pair and can sometimes be referred to as a Parent-Child relationships. In the example below the Figure tag is the parent tag and image container is the Child tag.

Every parent tag will have a child tag. This is useful for moving tags around in the tags panel.

The PDF Tags breakdown

If a tag is not properly categorized it will fail accessibility checks and be confusing to its users. Adding tags does not change the visual appearance of the document; it provides invisible layer of formatting within the document that works with screen readers. PDF tags also allows the content to reflow seamlessly on devices with smaller screens, like smartphones and tablets. Here is a brief explanation of what each tag represents:

<P>

The P tag is the most basic and universal tag. This tag is used as body text.

<H1> <H2> <H3> <H4> <H5> <H6>

These are heading tags. Most documents will have a single H1 tag, but larger documents could contain more. Modern assistive technology can recognize up to six heaving levels. Always use headings in order. Think of them like an outline.

  1. The Parent Tag <H1>
  2. The child tag (container)
  3. The content the tag is referencing (content on page)
The Parent Tag <H1>
The child tag (container)
The content the tag is referencing (content on page)

pdf tags

<L> <LI> <Lbl> <LBody>

List elements contain a specific structure. These tags represent the structure of accessible lists. Some accessibility guidelines require the use of Lbl and other guidelines do not.

  1. List Parent Tag <L>
  2. List Item Child Tag <LI>
  3. Label <Lbl>
  4. List Body child Tag <LBody>
  5. Contents of First list item
  6. List item content on page
List Parent Tag <L>
List Item Child Tag <LI>
Label <Lbl>
List Body child Tag <LBody>
Contents of First list item
List item content on page


pdf tags

<Figure>

The figure tag represents any and all images. At this time the figure tag is used for all graphics within a PDF.

  1. <Figure> is a parent tag
  2. The Image is a child tag (container)
  3. The image as content on page
<Figure> is a parent tag

The Image is a child tag (container)

The image as content on page

<Table> <TR> <TH> <TD>

Reading plain text is an easy task for assistive technologies. A table of data presents a complex more task. Proper PDF tag structure makes this possible by identifying essential information including the number of rows and columns as well as column (or row) headers, and which heading each data entry corresponds to. The more complex a table is, the more significant the challenge to tag it correctly.

  1. Table Parent Tag <Table>
  2. Table Row Child tag <TR>
  3. Table Header Cell <TH>
  4. Table Data Cell <TD>
  5. Table on Page
Table Parent Tag <Table>
Table Row Child tag <TR>
Table Header Cell <TH>
Table Data Cell <TD>
Table on Page

<Link>, Link – OBJR

Every link tag needs a Link-OBJR tag.

  1. Parent tag <P>
  2. Link Tag <Link>
  3. Link Reference Object
  4. The link Text on screen
  5. Content on page
Parent tag <P>
Link Tag <Link>
Link Reference Object 
The link Text on screen
Content on page

<Reference> & <Note>

Reference and Note tags are up for interpretation but are commonly used within PDFs to “visually” break content apart.

Accessibility can be confusing - book a free 15 minute call with The Accessibility Guy

Reading Order

An accessible PDF provides the instructions to the assistive technologies such as screen readers to read the content properly and in the correct order. The tag order within the tag tree will determine the reading order of the document. For documents without this logical structure, the best case would be that assistive technologies would guess at the correct order that the content should be presented in. In worst cases, the content would be completely unable to be read. The outcome is that the content becomes useless to the user.

How do I apply tags to a document?

There are multiple methods to apply tags to a document. The most common methods are:

Advanced Tag Breakdown

The following is a detailed breakdown of available tag structure within a pdf. It has been adapted from Accessible PDF Tutorials how to create PDF/UA compliant documents. 

Grouping elements

PDF tag Semantic meaning Possible and semantically meaningful parent elements Possible and semantically meaningful child elements
Document Represents a complete document Grouping elements, Block-level structure elements
Part Division of a larger document into smaller, associated parts Document ArtSectDivBlockQuoteCaptionTOCIndex
Art Parts of content which together are conclusive, i.e. an article or part of a document DocumentPartSectDivBlockQuote SectDivBlockQuoteCaptionTOCIndex
Sect Grouped related content parts, for example several paragraphs, which can be combined into a group DocumentPartArtSectDivBlockQuote ArtSectDivBlockQuoteCaptionTOCIndex
Div Generic group element without semantic meaning DocumentPartArtSectDivBlockQuote ArtSectDivBlockQuoteCaptionTOCIndex
BlockQuote One or more paragraphs that originate from another author, in other words, that have been quoted DocumentPartArtSectDiv ArtSectDivCaption
Caption A caption to describe for example a picture or a table DocumentPartArtSectDivBlockQuoteTableL SectDivBlockQuote
TOC Container for table of contents entries. Can be used either as a flat hierarchy (all contained TOCI on one level) or as a complex hierarchy (TOC within a TOCI as a subgroup). Can be contained multiple times in a document, since it can also be used for image or table directories. DocumentPartArtSectDiv TOCI
TOCI Entry within a table of contents (TOC). TOC TOCPLblReference
Index Container for a subject index DocumentPartArtSectDiv L

Block-level structure elements

Paragraph elements

PDF tag Semantic meaning Possible and semantically meaningful parent elements Possible and semantically meaningful child elements
P Ordinary paragraph DocumentPartArtSectDivBlockQuoteCaptionTOCI Inline-level structure elements
H1H2H3H4H5H6 Hierarchical headings on levels 1 to 6 DocumentPartArtSectDivBlockQuote Inline-level structure elements

List elements

PDF tag Semantic meaning Possible and semantically meaningful parent elements Possible and semantically meaningful child elements
L List container; groups together all list elements that belong together DocumentPartArtSectDivBlockQuoteIndex LICaption
LI Container of a list entry; can contain an L to create multi-level lists L LblLBodyL
Lbl Comes from the term “label” and represents the numbering or bullet character within a list. It’s not actually a block-level structure element and can also be used in other elements such as TOCI or Caption. LI
LBody Contains the contents of a list entry LI Inline-level structure elements

Table elements

PDF tag Semantic meaning Possible and semantically meaningful parent elements Possible and semantically meaningful child elements
Table Table container; combines all related table elements DocumentPartArtSectDivBlockQuote TRCaptionTHeadTBodyTFoot
TR Groups a table row TableTHeadTBodyTFoot THTD
TH Table heading cell; describes the meaning either at horizontal (line) or vertical (column) level TR Inline-level structure elements
TD Ordinary table data cells TR Inline-level structure elements
THead A group of table rows (TR) to mark them as table header; can be used optionally Table TR
TBody A group of table rows (TR) to mark them as table content; can be used optionally Table TR
TFoot A group of table rows (TR) to mark them as table footer; can be used optionally Table TR

Inline-level structure elements

PDF tag Semantic meaning Possible and semantically meaningful parent elements Possible and semantically meaningful child elements
Span Generic container without semantic meaning; is used, among other things, for visual markups, language changes or for adding ActualText (e.g. for ignoring hyphens) PH1H6LBodyTDQuoteNote
Quote Used like BlockQuote for quoted content; however, Quote is used at line level PH1H6LBodyTD Span
Note Footnote or endnote text (not the reference character in the body text). The footer/end-note character within Note and Reference will be placed in a Lbl. PH1H6LBodyTD LblPSpan
Reference Refers to another place in the document, e.g. footnote or directory entry PH1H6LBodyTD Lbl
Code Marking of programming language PH1H6LBodyTD
Link Link to a web page or to a place within the document PH1H6LBodyTD
Annot Annotations that are not a link or a widget (form field), like comments and videos. PH1H6LBodyTD

Illustration graphic elements

PDF tag Semantic meaning Possible and semantically meaningful parent elements Possible and semantically meaningful child elements
Figure Photo or graphic DocumentPartArtSectDivBlockQuotePLBodyTD
Formula Mathematical formula DocumentPartArtSectDivBlockQuotePH1H6LBodyTD
Form Form element DocumentPartArtSectDivPTD

How to add tags to a PDF

Need more PDF Training?

Let me be your champion for inclusion. I offer tailored solutions (and self-paced courses!) to ensure your documents meet and exceed compliance expectations. For more detailed insights, tutorials, and in-depth discussions on accessibility and related topics, don’t forget to check out my YouTube channel: The Accessibility Guy on YouTube. Subscribe for regular updates!

Related Articles

Responses

Leave a Reply

  1. […] Tagging Tips: Change ‘figure’ tags to ‘p’ tags when they hold text, and condense ‘p’ tags that separate text unnecessarily. Artifact unused ‘p’ tags to clean things up. […]

Discover more from The Accessibility Guy

Subscribe now to keep reading and get access to the full archive.

Continue reading