Skip to content

Commit 9e2ac7c

Browse files
authored
Merge 531ffc2 into 38e12d3
2 parents 38e12d3 + 531ffc2 commit 9e2ac7c

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

source/NVDAObjects/IAccessible/ia2Web.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,14 @@ def _get_mathMl(self):
344344
attr = mathPres.insertLanguageIntoMath(attr, self.language)
345345
return attr
346346
if self.IA2Attributes.get("tag") != "math":
347-
# This isn't MathML.
347+
# Could be a <span> (etc) that has role = math -- check the child
348+
# If there is a single <math> child, recurse on the assumption that is what was the intended math
349+
mathObjs: str | None = [
350+
child for child in self.children if child.IA2Attributes.get("tag") == "math"
351+
]
352+
if len(mathObjs) == 1:
353+
return mathObjs[0].mathMl
354+
# This isn't MathML
348355
raise LookupError
349356
if self.language:
350357
attrs = ' xml:lang="%s"' % self.language

user_docs/en/changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ To use this feature, "allow NVDA to control the volume of other applications" mu
4141

4242
### Bug Fixes
4343

44+
* MathML inside of span and other elements that have the attribute `role="math"` is now spoken/brailled
4445
* Native support for the Dot Pad tactile graphics device from Dot Inc as a multiline braille display. (#17007)
4546
* Improvements when editing in Microsoft PowerPoint:
4647
* Caret reporting no longer breaks when text contains wide characters, such as emoji. (#17006 , @LeonarddeR)

0 commit comments

Comments
 (0)