Conversation
…h a space, rather only do this for math nodes. this ensures NvDA still exposes alt text on formulas. this approach still alows for supporting embedded mathml trees in NVDA, though this was never standardized in PDF.
|
Thank you, thank you, thank you! (I'm looking forward to when this version is released!) |
Nael-Sayegh
pushed a commit
to Nael-Sayegh/nvda
that referenced
this pull request
Feb 15, 2024
…16067) Fixes nvaccess#12715 Summary of the issue: Authors of PDFs can provide alternative text on formular nodes via the 'alt' attribute. However, NvDA ignores this and replaces it with a single space, with the assumption that the formula will contain an inner mathml tree structure. The idea of embedding a full mathml tree structure with in formula nodes was never standardized, and only a few experimental PDFs actually exist. However, it is becoming common for authors to place alt text (perhaps a simple english representation of math) on formula nodes. Description of user facing changes In Adobe Reader, alternative text for formulas will be reported if provided by the author. Description of development approach Adobe Acrobat vbuf backend: Don't replace content in formula tags with a space, rather only do this for math nodes. this ensures NvDA still exposes alt text on formulas. this approach still allows for supporting embedded mathml trees if they exist as a direct child of the formula.
SaschaCowley
pushed a commit
to SaschaCowley/nvda
that referenced
this pull request
Feb 27, 2024
…16067) Fixes nvaccess#12715 Summary of the issue: Authors of PDFs can provide alternative text on formular nodes via the 'alt' attribute. However, NvDA ignores this and replaces it with a single space, with the assumption that the formula will contain an inner mathml tree structure. The idea of embedding a full mathml tree structure with in formula nodes was never standardized, and only a few experimental PDFs actually exist. However, it is becoming common for authors to place alt text (perhaps a simple english representation of math) on formula nodes. Description of user facing changes In Adobe Reader, alternative text for formulas will be reported if provided by the author. Description of development approach Adobe Acrobat vbuf backend: Don't replace content in formula tags with a space, rather only do this for math nodes. this ensures NvDA still exposes alt text on formulas. this approach still allows for supporting embedded mathml trees if they exist as a direct child of the formula.
Adriani90
pushed a commit
to Adriani90/nvda
that referenced
this pull request
Mar 13, 2024
…16067) Fixes nvaccess#12715 Summary of the issue: Authors of PDFs can provide alternative text on formular nodes via the 'alt' attribute. However, NvDA ignores this and replaces it with a single space, with the assumption that the formula will contain an inner mathml tree structure. The idea of embedding a full mathml tree structure with in formula nodes was never standardized, and only a few experimental PDFs actually exist. However, it is becoming common for authors to place alt text (perhaps a simple english representation of math) on formula nodes. Description of user facing changes In Adobe Reader, alternative text for formulas will be reported if provided by the author. Description of development approach Adobe Acrobat vbuf backend: Don't replace content in formula tags with a space, rather only do this for math nodes. this ensures NvDA still exposes alt text on formulas. this approach still allows for supporting embedded mathml trees if they exist as a direct child of the formula.
NSoiffer
added a commit
to NSoiffer/nvda
that referenced
this pull request
Oct 10, 2024
…vaccess#16067)" This partially reverts commit fbfcd14. That commit broke getting MathML from the document. While there were almost no MathML PDFs available in the past, pdftex can now generate MathML in Associated Files which are then exposed as the contents when a formula tag has role=math. New code in NVDAObjects\IAccessible\adobeAcrobat.py handles any alternative text that gets exposed by the PDF processor.
NSoiffer
added a commit
to NSoiffer/nvda
that referenced
this pull request
Oct 10, 2024
…e Reader: support alternative text on formulas in PDFs (nvaccess#16067)") This change doesn't allow MathML in formula tags. That was ok before, but now pdftex puts out MathML in an associated file and FoxIt reader makes it the content of a formula tag. Adobe is generally on board with this idea but hasn't implemented handling of associated files yet. Currently Adobe Reader does not know about Associated Files. So the contents are the alternative text. This is handled by making it an `mtext` element. Note: if the alt text is LaTeX, then it has lots of "punctuation" such as `{` and `\`. This typically would _not_ be read by NVDA. MathCAT currently passes this along unchanged to NVDA, but I have marked this as a bug and will have MathCAT produce speech that won't be discarded, so the experience will be an improved one over just speaking the alt text.
NSoiffer
added a commit
to NSoiffer/nvda
that referenced
this pull request
Oct 10, 2024
…e Reader: support alternative text on formulas in PDFs (nvaccess#16067)") This change doesn't allow MathML in formula tags. That was ok before, but now pdftex puts out MathML in an associated file and FoxIt reader makes it the content of a formula tag. Adobe is generally on board with this idea but hasn't implemented handling of associated files yet. Currently Adobe Reader does not know about Associated Files. So the contents are the alternative text. This is handled by making it an `mtext` element. Note: if the alt text is LaTeX, then it has lots of "punctuation" such as `{` and `\`. This typically would _not_ be read by NVDA. MathCAT currently passes this along unchanged to NVDA, but I have marked this as a bug and will have MathCAT produce speech that won't be discarded, so the experience will be an improved one over just speaking the alt text.
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:
Fixes #12715
Summary of the issue:
Authors of PDFs can provide alternative text on formular nodes via the 'alt' attribute. However, NvDA ignores this and replaces it with a single space, with the assumption that the formula will contain an inner mathml tree structure.
The idea of embedding a full mathml tree structure with in formula nodes was never standardized, and only a few experimental PDFs actually exist. However, it is becoming common for authors to place alt text (perhaps a simple english representation of math) on formula nodes.
Description of user facing changes
In Adobe Reader, alternative text for formulas will be reported if provided by the author.
Description of development approach
Adobe Acrobat vbuf backend: Don't replace content in formula tags with a space, rather only do this for math nodes. this ensures NvDA still exposes alt text on formulas. this approach still allows for supporting embedded mathml trees if they exist as a direct child of the formula.
Testing strategy:
Known issues with pull request:
None known.
Code Review Checklist: