What the validator is telling you
Numbered heading tags, H1 to H6, describe an outline. PDF/UA-1 clause 7.4.2 lets that outline go down one level at a time and no faster. An H1 can be followed by an H2. It cannot be followed by an H3.
The rule applies only on the way down. Going back up can skip levels: an H4 followed by an H2 is the normal end of a subsection. A level can be repeated as often as the document needs. veraPDF's own description of the rule adds that "A document may increment its heading sequence without restarting at H1 if document semantics require it".
We reproduced it
We took a one-page test file that passes veraPDF's PDF/UA-1 profile. Its first two headings are an H1 and an H2. We retagged that H2 as H3 and changed nothing else. This is the failed rule from the report, shortened to the lines that matter:
<rule specification="ISO 14289-1:2014" clause="7.4.2" testNumber="1" status="failed" failedChecks="1">
<context>... /K[2](21 0 obj SEHn H3)</context>
<errorMessage>Heading level 2 is skipped in a descending sequence of header levels</errorMessage>
The message names the level that is missing, and the context line points at the tag where the jump lands. The number in the message changes with the level skipped, so your report may say level 3 or level 4.
What a reader experiences
Screen reader users move through a long document by its headings, and many do it by level: list the level 2 headings to see the sections, then drop to level 3 inside one of them. A skipped level makes a section look as if it has a missing parent. The reader cannot tell whether the document is built that way or whether a heading failed to load, and may go looking for content that does not exist.
Why it happens
- Heading styles were chosen for their look. "Heading 3" was used under a chapter title because it was the right size, and the export followed the style.
- A level was mapped to the wrong tag. One style in the template exports as
H3when its place in the outline is level 2. - Content was cut. A section heading was deleted late in production and its subsections stayed.
- An automatic step guessed levels from font size, and two heading styles were close in size.
How to confirm it
List the headings in order and read down the levels. The free Poppler tools print the tag tree with the text of each element:
pdfinfo -struct-text file.pdf
Look only at the lines that begin with H1 to H6. Each one should be at most one level deeper than the heading before it. In Acrobat, the Tags panel shows the same sequence.
How to fix it
Decide what the outline of the document really is, then make the tags say so. Changing a tag only to silence the validator can leave a heading at a level that misleads the reader.
In Acrobat
- In the Tags panel, find the heading the report points to.
- Right-click the tag and choose Properties.
- On the Tag tab, change Type to the correct heading level.
- Check the headings that follow. Fixing one level often means moving its subsections up as well.
At the source
- Word: use the built-in heading styles in order, and change how a style looks instead of choosing a different level for its appearance.
- InDesign: open Paragraph Style Options for each heading style and set the tag under Export Tagging, so that each style maps to its level in the outline.
What this check does not cover
- 14-001, "Headings are not tagged", needs a person. A heading tagged as a paragraph breaks no sequence, so the validator has nothing to report. We show this in Passed the validator, failed the reader.
- A sequence with no gaps can still be wrong. A validator cannot tell that a section title was tagged one level too deep throughout.
- 14-002, the first heading is not
H1, and 14-007, numbered and unnumbered headings are mixed, are the two related machine checks.
How PDFxt handles it
PDFxt tags the structure of the document automatically during remediation, and the exported file is validated. Whether each heading sits at the right level of the outline is still for a person to confirm.
Related
- What InDesign's PDF export carries over for accessibility, for mapping paragraph styles to heading tags.
- W3C technique PDF9: Providing headings by marking content with heading tags.
- veraPDF PDF/UA-1 profile, rule 7.4.2-1.