Page MenuHomePhabricator

Convert Math Template to generate hidden MathML alongside of the "HTML math" that it currently generates
Closed, ResolvedPublic

Description

Math that is authored with TeX inside of <math> tags is accessible because part of the output is MathML. The output is usually(?) hidden via the use of a 1 pixel clipping rect, but it is still accesssible to assistive technology such as screen readers.

The same is not true of math authored with the math template. The math template is likely used by authors because it's output is HTML and so it looks like the surrounding text. However the HTML output uses <i>, <sup>, and CSS tricks to make (simple) expressions look like math, but these tricks result in inaccessible math.

By using the same invisible MathML trick used for <math> output (i.e, putting MathML alongside the HTML output), this math can also be made accessible.

@Physikerwelt said that he and Richard Zanibbi developed software to automatically convert the math templates to regular <math> tags, and hence make them accessible. The downside of this solution is that it alters the appearance of the math and readers may not be happy with that change. My suggestion does not alter the input or the visible output, and hence should have no affect on authors or readers other than a slight increase in the page size. It will however make the math accessible to users who make use of MathML-enabled assistive technologies. Given Moritz's existing work, it is hopefully not much effort to grab the MathML that would be generated from the resulting <math> tag and use that as the MathML to insert next to the current output.

FYI: as a test, I mocked up some inline examples with invisible MathML and the result looked like the original but was accessible.