Bug 168720 - PDF option to export formula source as Alt attribute
Summary: PDF option to export formula source as Alt attribute
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks: PDF-Accessibility
  Show dependency treegraph
 
Reported: 2025-10-06 17:02 UTC by László Németh
Modified: 2025-10-07 13:06 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description László Németh 2025-10-06 17:02:56 UTC
Description:
According to PDF/UA accessibility guidelines, “All mathematical expressions shall be enclosed within a Formula tag and shall have an ALT attribute.” (https://accessiblewebsiteservices.com/accessible-pdfs-math-formulas-screen-readers-2/)

Likely it's worth to add a PDF option to export formula source, when  to comply accessibility guidelines.

Steps to Reproduce:
Create a formula and try to export the document in PDF/UA.

Actual Results:
Accessibility checker reports the missing Alt attribute.

Expected Results:
Offer an option to export all the formulas without Alt attribute with the source. Firefox, Chrome, Acrobat expose alt text to screen readers.


Reproducible: Always


User Profile Reset: No

Additional Info:
...
Comment 1 László Németh 2025-10-06 17:08:00 UTC
@Michael: I participated in an NLnet workshop on open publishing today, and one of the problems was the missing accessibility information of math formulas (on web pages. Maybe this proposal about the possible improvement of the PDF/UA export could help a little bit, but I wasn't able to test Firefox/Chrome/ Acrobat/Gnome Document Viewer with a screen reader. Hopefully the alt attribute would be able to work them.
Comment 2 Michael Weghorn 2025-10-07 09:05:44 UTC
(In reply to László Németh from comment #1)
> @Michael: I participated in an NLnet workshop on open publishing today, and
> one of the problems was the missing accessibility information of math
> formulas (on web pages. Maybe this proposal about the possible improvement
> of the PDF/UA export could help a little bit, but I wasn't able to test
> Firefox/Chrome/ Acrobat/Gnome Document Viewer with a screen reader.
> Hopefully the alt attribute would be able to work them.

Thanks, that sounds good to me in general, and improving formula support would be great indeed!

Michael S., Tibor and Balazs (now CC'ed) are probably more familiar with the PDF/UA export in particular, maybe they have additional thoughts.

From what I've seen elsewhere (but not looked into in detail yet), using MathML might possibly be an option. Information in these merged NVDA changes might be helpful for background information how NVDA and other office suites handle it:

https://github.com/nvaccess/nvda/pull/17276
https://github.com/nvaccess/nvda/pull/18056

Also related: tdf#159364
Comment 3 Michael Weghorn 2025-10-07 09:09:45 UTC
(In reply to László Németh from comment #1)
> Maybe this proposal about the possible improvement
> of the PDF/UA export could help a little bit, but I wasn't able to test
> Firefox/Chrome/ Acrobat/Gnome Document Viewer with a screen reader.

I don't yet have much experience with PDF viewer accessibility either, but if there's anything you would like me to check (or look into together) in particular, please just let me know.

Possibly, PDF a11y checkers like PAC *might* also have corresponding automated checks.
Comment 4 László Németh 2025-10-07 13:06:27 UTC
@Michael: thanks for your quick feedback and nice references! Indeed, (X)HTML export is the other important task, glad to see it has already been reported in Bug 159364. Maybe the easiest UNO based implementation could be similar to the redaction tool: filling alt attributes  on temporarily before exporting to PDF/UA or (X)HTML. Implementing it would be a good example for other formula editors, too, e.g. the Overleaf and Typst online document editors (unless they are already ahead of us).

It seems for the linked nvaccess issues, there is an alternative MathML method for PDFs over the Alt text, but Acrobat Reader supports (supported) only the alt text, so it's still worth to add LibreOffice support for that. (Also NVDA screen reader supports better the LaTeX source in the alt text, now reading the punctuation, too, so in theory, the it can support the very similar OpenOffice.org/LibreOffice syntax, too.)

Note: place of the Alt attribute of formulas using their context menu: Properties...->Options->Accessibility->Text alternative.