AdobeAcrobat: support custom Microsoft Office mathml attribute.#18056
Merged
Conversation
Member
|
how does this relate to #17984? |
Member
Author
|
I'd say #17984 should be merged first, and then the conflict (if any)
fixed up.
Either way, this is just a couple of lines which should go in the top
of `_get_mathml` which will not affect the existing logic, but handles
the specific case of MS Office generated PDFs much nicer.
|
Member
|
Can you resolve conflicts? I've merged that PR |
f2b6ceb to
2c6988f
Compare
Member
Author
|
I've fixed up conflicts now that #17984 is merged. |
See test results for failed build of commit eaf8b84603 |
seanbudd
reviewed
May 6, 2025
seanbudd
approved these changes
May 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
None
Blocked by #17984
Summary of the issue:
In #17276, NVDA now treats the value of formular nodes in Adobe Acrobat as mathml, with out any real validation.
In PDF 2.0 documents, this is no doubt an okay assumption, but for PDF 1.7 documents generated by Microsoft Word, this is now causing Microsoft word generated math speech alternative text to be processed by mathCAT, resulting in broken or junk navigation, as Microsoft Word is exposing its math speech text as the value of the node.
However, at the same time Microsoft has also introduced a new custom mathml attribute it is exposing on formula nodes in PDFs generated from Microsoft Word, that contains real mathMl which is suitable for MathCAT.
NVDA should make use of this new custom attribute if it exists.
Description of user facing changes
In Adobe Acrobat, NVDA can now read and interact with Math equations in PDF documents generated by Microsoft word.
Description of development approach
AcrobatNode NVDAObject's mathml property: first try and fetch Microsoft Office's custom mathMl custom attribute if it exists. Otherwise fallback to using the node's value or descendants.
Testing strategy:
Opened several PDF documents generated by icrosoft ord that contain math equations. Ensured that they could be read and interactive with using MathCAT.
Known issues with pull request:
None known.
Code Review Checklist:
@coderabbitai summary