Skip to content

Commit

Permalink
Mozilla MathML support: Don't return invalid MathML markup if an elem…
Browse files Browse the repository at this point in the history
…ent has no data-mathml attribute, is not a math tag but has ARIA role="math"; e.g. MathJax output.
  • Loading branch information
jcsteh committed Apr 15, 2015
1 parent f380a32 commit aaf3e71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/NVDAObjects/IAccessible/mozilla.py
Expand Up @@ -184,7 +184,9 @@ def _get_mathMl(self):
if not mathPres.getLanguageFromMath(attr) and self.language:
attr = mathPres.insertLanguageIntoMath(attr, self.language)
return attr
# Assume the content is MathML.
if self.IA2Attributes.get("tag") != "math":
# This isn't MathML.
raise LookupError
if self.language:
attrs = ' xml:lang="%s"' % self.language
else:
Expand Down

0 comments on commit aaf3e71

Please sign in to comment.