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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion source/NVDAObjects/IAccessible/ia2Web.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
)
from ctypes import c_short
from comtypes import COMError, BSTR
from comtypes.hresult import E_NOTIMPL

import oleacc
from annotation import (
Expand Down Expand Up @@ -336,7 +337,13 @@ def _get_mathMl(self):
# Try the data-mathml attribute.
attrNames = (BSTR * 1)("data-mathml")
namespaceIds = (c_short * 1)(0)
attr = node.attributesForNames(1, attrNames, namespaceIds)
try:
attr = node.attributesForNames(1, attrNames, namespaceIds)
except COMError as e:
if e.hresult != E_NOTIMPL:
log.debugWarning(f"MathML getting attr error: {e}")
raise
attr = None
if attr:
import mathPres

Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Prefix matching on command line flags, e.g. using `--di` for `--disable-addons`

### Bug Fixes

* Restore reading of math in Chromium-based browsers (Chrome/Edge/...) by handling a change they made (#17421)
* Math reading has been fixed for some web elements.
Specifically, MathML inside of span and other elements that have the attribute `role="math"`. (#15058)
* Native support for the Dot Pad tactile graphics device from Dot Inc as a multiline braille display. (#17007)
Expand Down
Loading