Merge branch 'issue1192' into develop. Issue #1192.

This commit is contained in:
Davide P. Cervone 2015-09-12 11:11:39 -04:00
commit 4c5314c95f
2 changed files with 5 additions and 3 deletions

View File

@ -1666,6 +1666,9 @@
MML.math.Augment({
toCommonHTML: function (node) {
node = this.CHTMLdefaultNode(node);
var alttext = this.Get("alttext");
if (alttext && !node.getAttribute("aria-label")) node.setAttribute("aria-label",alttext);
if (!node.getAttribute("role")) node.setAttribute("role","math");
if (this.CHTML.pwidth) {
node.parentNode.style.width = this.CHTML.pwidth;
node.parentNode.style.minWidth = this.CHTML.mwidth;

View File

@ -2100,9 +2100,8 @@
// Add it to the MathJax span
//
var alttext = this.Get("alttext");
if (alttext && !svg.element.getAttribute("aria-label")) span.setAttribute("aria-label",alttext);
if (!svg.element.getAttribute("role")) span.setAttribute("role","math");
// span.setAttribute("tabindex",0); // causes focus outline, so disable for now
if (alttext && !svg.element.getAttribute("aria-label")) svg.element.setAttribute("aria-label",alttext);
if (!svg.element.getAttribute("role")) svg.element.setAttribute("role","img");
span.appendChild(svg.element);
svg.element = null;
//