Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When role="math" is present, MathCAT isn't called #15058

Closed
NSoiffer opened this issue Jun 26, 2023 · 5 comments · Fixed by #17327
Closed

When role="math" is present, MathCAT isn't called #15058

NSoiffer opened this issue Jun 26, 2023 · 5 comments · Fixed by #17327
Labels
feature/math needs-technical-investigation A technical investigation is required to progress the issue. p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@NSoiffer
Copy link
Contributor

NSoiffer commented Jun 26, 2023

Steps to reproduce:

Open a file that has role="math" specified around some MathML. Navigate to the math. Nothing is spoken for the math when MathCAT is used to read the math. I'm pretty sure the same is true when MathPlayer or Access8Math is used to read the math.

This example file has two instances of math. They are identical except that the first one has role="math" given on the span around the math element (both have a span element). Note: file is zipped html because I can't attach HTML in github.

Actual behavior:

Nothing is spoken for the math with role="math" specified, but the math is read for the second instance without role given.

Expected behavior:

AFAIK, role="math" should not affect the behavior of NVDA for enclosed math.

I discovered this bug based on a real-life file not speaking math in NVDA.

NVDA logs, crash dumps and other attachments:

Nothing in the log file.

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

2023.1

Windows version:

Windows 10

Name and version of other software in use when reproducing the issue:

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

Haven't tried other versions

If NVDA add-ons are disabled, is your problem still occurring?

You need at least one math add-on to try this out.

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

MathCAT doesn't use a COM interface.

@ways2read
Copy link

This issue occurs when reading math generated by Atypon's journal platform (allegedly used by 60% of English language academic journals). It affects math displayed on web pages and in generated EPUBs.

@ways2read
Copy link

It seems related to #4422

@seanbudd seanbudd added feature/math p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation. needs-technical-investigation A technical investigation is required to progress the issue. labels Jun 28, 2023
@jmegginson
Copy link

Vote for this. An update would be appreciated. This is also true when role="math" is applied around a MathJax object.

Is this a limitation of NVDA, Access8Math plugin or both?

In comparison, JAWS continues to allow the math viewer to operate when role="math" is applied around a MathJax (MathML) object.

@Adriani90
Copy link
Collaborator

cc: @NSoiffer

@NSoiffer
Copy link
Contributor Author

I just tried 2024.4 rc1 and the problem is still there. It is happening at a level above MathCAT. I will try to debug the NVDA code and see if I can trace down where the problem lies.

NSoiffer added a commit to NSoiffer/nvda that referenced this issue Oct 27, 2024
The fix (which is a bit of a hueristic) is to look inside the `span` (or other element with `role="math"` and see if exactly one of the children is `math`. If so, then we recursively call the code to get the MathML for it.

If there isn't exactly one math element, we fall through and raise a LookupError (which is what happened before adding this check).
NSoiffer added a commit to NSoiffer/nvda that referenced this issue Oct 27, 2024
@github-actions github-actions bot added this to the 2025.1 milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/math needs-technical-investigation A technical investigation is required to progress the issue. p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants