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

Support math in Chrome #7184

Merged
merged 2 commits into from Jun 9, 2017

Conversation

Projects
None yet
3 participants
@jcsteh
Contributor

jcsteh commented May 18, 2017

Link to issue number:

No specific issue. However, lack of support for math in Chrome was mentioned in #5555 (comment). Chromium issue 426650 is the issue I filed against Chrome requesting the bits we needed to make this work.

Summary of the issue:

Math is currently supported in Firefox and IE, but not Chrome. This PR makes it work in Chrome.

Description of how this pull request fixes the issue:

Now that the Chrome issue linked above is fixed (and has been for a few months), we can use the same math retrieval code we use for Firefox. Since both Firefox and Chrome use NVDAObjects.IAccessible.ia2Web, I moved the math code from NVDAObjects.IAccessible.mozilla into ia2Web. In addition to moving the code, we also catch COMError because this isn't yet in Chrome stable and because this can fail in Firefox too if the ISimpleDOM COM proxy isn't registered.

Testing performed:

Tested the following test case in Firefox nightly (55.0a1 (2017-05-16)), Chrome canary (60.0.3102.0) and Chrome stable (58.0.3029.110):
data:text/html,<math><mfrac><mn>2</mn><mi>x</mi></mfrac></math>text
In Firefox and Chrome stable, I got "2 over x text" as expected.
In Chrome stable, I got just "text", which is expected because math isn't supported there.

Known issues with pull request:

Math isn't supported in Chrome stable at present, but we handle it gracefully and this will just start working once Chrome 59 is released and users are updated. Chrome 59 is due on 6 June, which is more than two months before NVDA 2017.3 will be released, so I didn't see any need to mention the Chrome version number in the User Guide.

Change log entry:

In New Features:

- Mathematical content (provided as MathML) is now supported in Google Chrome. (#7184)
Support math in Chrome.
In Chrome, we use exactly the same code to retrieve MathML as we do in Firefox, so move the math code from NVDAObjects.IAccessible.mozilla into NVDAObjects.IAccessible.ia2Web (which is used by both Firefox and Chrome). We also catch COMError because this isn't yet in Chrome stable and because this can fail in Firefox too if the ISimpleDOM COM proxy isn't registered.
@feerrenrut

Overall this looks good, and the description on this PR is excellent!

Show outdated Hide outdated source/NVDAObjects/IAccessible/ia2Web.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment