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

Fix math not being read in Chromium-based browsers (#17421) #17528

Closed
wants to merge 3 commits into from

Conversation

NSoiffer
Copy link
Contributor

@NSoiffer NSoiffer commented Dec 15, 2024

Fix math not being read in Chromium-based browsers. Chromium made a change that causes a call to (correctly) return E_NOTIMPL.

This simple fix catches the exception and moves on. The NVDA behavior should be the same as before the Chromium change. Only E_NOTIMPL is caught, other COMErrors are re-raised.

Fixes #17421.

This fixes a very serious user-issue. I recommend that a 2024.4.2 build happen with this fix if possible.

Link to issue number:

Fixes #17421

Summary of the issue:

Chromium-browsers were changed to return E_NOTIMPL and broke speech and braille of all math equations (i.e., no speech or braille for math) in those browsers because NVDA passes along a 'not implemented' COM exception.

Description of user facing changes

This restores the behavior of NVDA (i.e., math reads) as before the change.

Description of development approach

A try/except block is added around the call. If the error is E_NOTIMPL, the code moves on as before. Otherwise, the error is re-raised as before.

Testing strategy:

Make sure that some math addon is present. I tested with MathCAT, but any math addon will do. Go to any page with math (e.g., https://en.wikipedia.org/wiki/Quadratic_equation). Navigate to a math expression. Without the change, you will not hear any math. With the change, you will hear the math expression being read.

Known issues with pull request:

None.

Code Review Checklist:

I did not make a change log entry because I don't know what version this change will go into. I think a simple entry like

Restore reading of math in Chromium-based browsers (Chrome/Edge/...) by handling a change they made.

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@coderabbitai summary

…ange that causes a call to (correctly) return E_NOTIMPL.

This simple fix catches the exception and moves on. The behavior should be the same as before the Chromium change. Only E_NOTIMPL is caught, other COMErrors are re-raised.

Fixes nvaccess#17421
@NSoiffer NSoiffer requested a review from a team as a code owner December 15, 2024 03:59
@NSoiffer NSoiffer requested a review from seanbudd December 15, 2024 03:59
@CyrilleB79
Copy link
Collaborator

The issue is quite serious. Though, it seems that it is fixed (at least temporarily) in Chrome 133. The question is When should Chrome 133 stable be released? An NVDA 2024.4.2 only makes sense if Chrome 133 stable release is not planned so soon.

@NSoiffer
Copy link
Contributor Author

Maybe someone from the chrome team can comment. I just got an update and it is 131. I suspect (but again, some from Chrome should verify) that the fix needs to make it from alpha, to beta, to release and each step is about four weeks. So that puts it two months out if I am correct.

@seanbudd seanbudd added this to the 2024.4.2 milestone Dec 15, 2024
@cary-rowen
Copy link
Contributor

Please wait and test 132.0.6834.40
In addition, according to the comment of cc @michaelDCurran, NV Access may have other improvement plans, please confirm.

@seanbudd
Copy link
Member

@NSoiffer - please ensure NV Access can push to your fork's branch when making a contribution. I'm not sure this is possible using master as your base branch for this PR. By default, NV Access should be able to push to forks, so something is going wrong here.

This PR needs to be rebased to RC, and a changelog entry added. I've pushed what this should look like here: https://github.com/nvaccess/nvda/compare/rc...fix17528?expand=1

@SaschaCowley SaschaCowley added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Dec 16, 2024
@SaschaCowley SaschaCowley changed the base branch from master to rc December 17, 2024 00:09
@SaschaCowley SaschaCowley requested a review from a team as a code owner December 17, 2024 00:09
@SaschaCowley SaschaCowley changed the base branch from rc to master December 17, 2024 00:10
@SaschaCowley SaschaCowley changed the title Fix math not being read in Chromium-based broswers (#17421) Fix math not being read in Chromium-based browsers (#17421) Dec 17, 2024
@CyrilleB79
Copy link
Collaborator

@NSoiffer this branch should be rebased onto rc, should not be based anymore onto master.

@NSoiffer
Copy link
Contributor Author

@seanbudd: I wasn't aware that pushes from a master branch causes a problem. I created #17548 from a non-master branch. One of these should be closed.

I'll deal with the 2024.4 rebase. Hopefully I'll get it right. Thanks for head start.

@NSoiffer
Copy link
Contributor Author

Are changes to the "rc" branch brought forward into master at some point or do there need to be specific commits to both rc and master?

@CyrilleB79
Copy link
Collaborator

Changes in the rc branch are back merged to beta branch and beta branch is back merged in the master branch. So you to care of master branch when rebasing to rc.

@josephsl
Copy link
Collaborator

josephsl commented Dec 18, 2024 via email

@seanbudd
Copy link
Member

Closing in favour of #17548

@seanbudd seanbudd closed this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NVDA cannot navigate math content in Chromium
6 participants