#2942·WeasyPrint

PDF/UA-1: links whose text is in a child element, or generated by CSS Notes, are not tagged as Link

Author: OpenForge888Created Sep 28, 2026Updated Sep 28, 2026
Labelsbug

Versions: WeasyPrint 70.0 (macOS 26.7); validated with veraPDF 1.30, --flavour ua1

Related to #1782 (closed). Plain links now pass PDF/UA-1, but two other kinds of link still fail ISO 14289-1 clause 7.18.5, which requires links to be tagged as Link elements.

xml
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>link tagging</title>
  <style>.note { position: note(note); }</style>
</head>
<body>
  <h1>Link tagging</h1>
  <p>A plain link: <a href="#target">plain</a>.</p>
  <p>Text in a child element: <a href="#target"><span>child span</span></a>.</p>
  <p>A CSS Notes note<span class="note">The note body.</span> in a paragraph.</p>
  <h2 id="target">Target</h2>
</body>
</html>

Rendered with weasyprint --pdf-variant pdf/ua-1 links.html links.pdf and checked with verapdf --flavour ua1 links.pdf, each case alone in its own file:

Case Link annotations veraPDF PDF/UA-1
plain link 1 PASS
link text inside a child <span> 2 FAIL, 7.18.5, 1 check
CSS Notes note (::note-call, ::note-callback) 2 FAIL, 7.18.5, 2 checks

Expected: every link annotation, including one whose text sits in a child element or comes from the CSS Notes UA stylesheet, is referenced from a Link structure element.