Bug 165294 - PDF/UA: Hyperlink in header/footer generates "Link annotation is not nested inside a Link structure element" error in PAC
Summary: PDF/UA: Hyperlink in header/footer generates "Link annotation is not nested i...
Status: RESOLVED DUPLICATE of bug 164797
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Accessibility
  Show dependency treegraph
 
Reported: 2025-02-17 15:04 UTC by Gabor Kelemen (allotropia)
Modified: 2025-03-20 12:09 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (24.43 KB, application/vnd.oasis.opendocument.text)
2025-02-17 15:04 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2025-02-17 15:04:22 UTC
Created attachment 199244 [details]
Example file from Writer

Attached example file contains hyperlinks in the header/footer.
When exported to PDF with PDF/UA enabled, the PAC tool complains about "Link annotation is not nested inside a Link structure element" error in case of the hyperlinks in the header/footer, but not about the same link in the document body.

1. Open attached file
2. Export it as PDF with PDF/UA enabled
3. Open the resulting file in the PAC tool 2024
-> sees error in the header/footer

May be similar to the bug 164797 - filing here just in case this is separate.

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 41ab24cecd6ad74312843f113d2faa13259cdb7d
CPU threads: 14; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

Already happens in 7.1, likely this is not a regression.
Comment 1 Tibor Nagy 2025-03-04 15:40:55 UTC
According to the standard, every element in the header and footer should be marked as an artifact. Artifact elements are content elements but they are not included in the PDF structure.

Creating a tagged PDF, hyperlinks should be avoided in the header and footer as well because the assistive technologies may still recognize the hyperlink on the header and the footer and read it on every page, potentially in the middle of a sentence as the text runs from one page to the next.
It can be quite confusing to have hyperlinks read out at the beginning or end of every page.

There is currently no such structural element in the PDF standard that can handle this problem.

Probably, someone with knowledge of accessibility would know this but what about the user who does not know this and still places a hyperlink in the header and the footer and exports the file as a tagged PDF?
These cases where the PDF/UA can't decide whether it wants to require things of applications or of end users who create the documents.

Currently, this issue can be resolved with the proper use of accessibility knowledge. Do not place hyperlinks in repeating headers or footers. Instead, place them in the main text of the document.

Probably the "a11y checker" should warn if there is a hyperlink in header/footer, but if the user does put a link there anyway we have to export it.(currently, there is no warning)
So, we could implement this "a11y checker" warning, it would be useful.
Comment 2 Gabor Kelemen (allotropia) 2025-03-04 16:12:06 UTC
It's okay to consider this a user error and issue a sidebar warning, saying 
"Avoid hyperlinks in the header and footer." or similar.

Also goes for the bug 164797.
Comment 3 Gabor Kelemen (allotropia) 2025-03-20 12:09:04 UTC
This was fixed with adding a new A11Y toolbar warning as part of bug 164797.

*** This bug has been marked as a duplicate of bug 164797 ***