From 902aa2bf7e265ac4a8cb9babe0269cb1bfca43bd Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 4 May 2016 08:18:59 -0400 Subject: [PATCH] Don't set role in CHTML and HTML-CSS output, and fix comments in other jax. Issue #1437. --- unpacked/jax/output/CommonHTML/jax.js | 1 - unpacked/jax/output/HTML-CSS/jax.js | 3 +-- unpacked/jax/output/PlainSource/jax.js | 3 +-- unpacked/jax/output/PreviewHTML/jax.js | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index f110fe42e..f7f9fc935 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -1718,7 +1718,6 @@ } 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||CHTML.Em(this.CHTML.w); diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js index eeb1db78c..74529cfc5 100644 --- a/unpacked/jax/output/HTML-CSS/jax.js +++ b/unpacked/jax/output/HTML-CSS/jax.js @@ -567,7 +567,7 @@ {prev.parentNode.removeChild(prev)} // // Add the span, and a div if in display mode, - // then set the role and mark it as being processed + // then mark it as being processed // jax = script.MathJax.elementJax; if (!jax) continue; jax.HTMLCSS = {display: (jax.root.Get("display") === "block")} @@ -2902,7 +2902,6 @@ span = this.HTMLcreateSpan(nobr); var alttext = this.Get("alttext"); if (alttext && !span.getAttribute("aria-label")) span.setAttribute("aria-label",alttext); - if (!span.getAttribute("role")) span.setAttribute("role","math"); stack = HTMLCSS.createStack(span); box = HTMLCSS.createBox(stack); // Move font-size from outer span to stack to avoid line separation // problem in strict HTML mode diff --git a/unpacked/jax/output/PlainSource/jax.js b/unpacked/jax/output/PlainSource/jax.js index a34ca39d4..c98de6ca7 100644 --- a/unpacked/jax/output/PlainSource/jax.js +++ b/unpacked/jax/output/PlainSource/jax.js @@ -69,8 +69,7 @@ prev.parentNode.removeChild(prev); } // - // Add the span, and a div if in display mode, - // then set the role and mark it as being processed + // Add the span, and a div if in display mode // jax = script.MathJax.elementJax; if (!jax) continue; diff --git a/unpacked/jax/output/PreviewHTML/jax.js b/unpacked/jax/output/PreviewHTML/jax.js index 1ff2c6c2e..ab63b94a5 100644 --- a/unpacked/jax/output/PreviewHTML/jax.js +++ b/unpacked/jax/output/PreviewHTML/jax.js @@ -189,7 +189,7 @@ {prev.parentNode.removeChild(prev)} // // Add the span, and a div if in display mode, - // then set the role and mark it as being processed + // then mark it as being processed // jax = script.MathJax.elementJax; if (!jax) continue; jax.PHTML = {display: (jax.root.Get("display") === "block")}