Bug 123870

Summary: Calc Not Creating accessible PDF's (tagged content, tab and reading order)
Product: LibreOffice Reporter: Dave Richards <drichard>
Component: Printing and PDF exportAssignee: Tibor Nagy <tibor.nagy.extern>
Status: RESOLVED FIXED    
Severity: normal CC: Armin.Le.Grand, aron.budea, bubli, jean-philippe.mengual, michael.meeks, m.weghorn, stephane.guillou, thb, vsfoote
Priority: medium Keywords: accessibility, filter:pdf
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=45636
https://bugs.documentfoundation.org/show_bug.cgi?id=67866
https://bugs.documentfoundation.org/show_bug.cgi?id=34142
Whiteboard: target:24.8.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 101912, 103378, 139007    
Attachments: Simple Spreadsheet
PDF as created by Calc
Using Adobe Pro to check the resulting file.
Results In Adobe Pro from Calc 6.3 (Alpha)

Description Dave Richards 2019-03-05 12:56:52 UTC
We have been sued because Calc is not creating ADA compliant PDF files.  It seems like the items that are missed would be very simple to implement.  I created a very simple spreadsheet that demonstrates and will attached.   The following checks do not pass.

Primary Language (this works in Writer, but not Calc)

Tagged content (this is checked during PDF export, but seems not to work)

Tab Order (In this case, the form button was not pressed, so there isn't really a tab order.  But there must be a PDF attribute that indicates this fact.  When you perform this with Excel, this check is not flagged).

Attaching work files.
Comment 1 Dave Richards 2019-03-05 12:57:28 UTC
Created attachment 149738 [details]
Simple Spreadsheet
Comment 2 Dave Richards 2019-03-05 12:57:55 UTC
Created attachment 149739 [details]
PDF as created by Calc
Comment 3 Dave Richards 2019-03-05 12:58:20 UTC
Created attachment 149740 [details]
Using Adobe Pro to check the resulting file.
Comment 4 Roman Kuznetsov 2019-03-05 13:34:52 UTC Comment hidden (obsolete)
Comment 5 Dave Richards 2019-03-05 13:39:30 UTC
Tested on Version: 6.1.4.0.0+

Syncing now with 6.3 daily to see how it works.
Comment 6 Dave Richards 2019-03-05 14:56:07 UTC
Ok, downloaded 6.3 daily snapshot:

TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-03-03_20:19:18

And it had the same results.  Three attributes seem not be written to the PDF from calc.   Attaching shot of results from Adobe Pro.
Comment 7 Dave Richards 2019-03-05 14:56:46 UTC
Created attachment 149747 [details]
Results In Adobe Pro from Calc 6.3 (Alpha)
Comment 8 V Stuart Foote 2019-03-05 17:29:01 UTC
So no /Lang entry gets recorded into the PDF (suggested in WCAG 2.0's PDF16 technique [1]) believe we should at least pick up the language from OS locale, or from default LO template in use. But then we don't really handle additional language assignments in Calc needed to tag at individual table or even the cell level--i.e. bug 34142

Otherwise with current master/6.3.0alpha0+, on Export to PDF from Calc with either "Tagged PDF (add document structure)" or the "Archive PDF/A-1a (ISO 19005-1)" selections checked--confirm a lack of tags in PDF for the table headings and cell elements, and lack of tab and reading order for the tables of the sheet (as in WCAG 2.0's PDF3 technique [2]).

Testing with veraPDF and, Acrobat Pro DC--on Windows 10 with current NVDA screen reader.

=-refs-=
[1] https://www.w3.org/TR/WCAG20-TECHS/PDF16.html
[2] https://www.w3.org/TR/WCAG20-TECHS/PDF3.html
Comment 9 Stéphane Guillou (stragu) 2022-12-28 12:41:09 UTC
With the fix for bug 67866, we now have a language tag for Calc accessible PDF export.
Comment 10 Commit Notification 2024-01-08 20:25:18 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b3c93b16d62e809500005edc749af4b8ad10162c

tdf#123870 sc: fix tagged content for accessible PDF export

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Stéphane Guillou (stragu) 2024-01-28 06:28:31 UTC
Thanks Tibor!

Dave, are you able to double-check that all requirements are matched now?
Master build that include the fix are available here: https://dev-builds.libreoffice.org/daily/master/current.html
Much appreciated.