Move location of assistive MathML to be more closely related to the position of the typeset math. Issue #1235.

This commit is contained in:
Davide P. Cervone 2015-12-08 19:02:37 -05:00
parent d776874898
commit e894193e51

View File

@ -36,6 +36,7 @@
styles: {
".MJX_Assistive_MathML": {
position:"absolute!important",
top: 0, left: 0,
clip: (HUB.Browser.isMSIE && (document.documentMode||0) < 8 ?
"rect(1px 1px 1px 1px)" : "rect(1px, 1px, 1px, 1px)"),
padding: "1px 0 0 0!important",
@ -44,6 +45,9 @@
width: "1px!important",
overflow: "hidden!important",
display:"block!important"
},
".MJX_Assistive_MathML.MJX_Assistive_MathML_Block": {
width: "100%!important"
}
}
},
@ -94,11 +98,14 @@
return MathJax.Callback.After(["HandleMML",this,state],err.restart);
}
frame.setAttribute("data-mathml",mml);
span = HTML.addElement(frame,"span",{
isMathJax: true, className: "MJX_Assistive_MathML"
span = HTML.addElement(frame,"span",{
isMathJax: true,
className: "MJX_Assistive_MathML"
+ (jax.root.Get("display") === "block" ? " MJX_Assistive_MathML_Block" : "")
});
span.innerHTML = mml;
frame.setAttribute("role", "presentation");
span.innerHTML = mml;
frame.style.position = "relative";
frame.setAttribute("role", "presentation");
frame.firstChild.setAttribute("aria-hidden","true");
span.setAttribute("role", "presentation");
}