Last modified: 2014-10-06 08:08:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T68537, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66537 - The MW_MATH_MATHML mode should expose the MathML to accessible tools
The MW_MATH_MATHML mode should expose the MathML to accessible tools
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Math (Other open bugs)
master
All All
: Unprioritized normal (vote)
: Future release
Assigned To: physikerwelt
:
Depends on:
Blocks: 65341
  Show dependency treegraph
 
Reported: 2014-06-12 17:25 UTC by Frédéric Wang
Modified: 2014-10-06 08:08 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Frédéric Wang 2014-06-12 17:25:30 UTC
Currently, the MW_MATH_MATHML mode generates MathML + SVG & PNG fallback. However, the MathML is only visible on Gecko and other rendering engines fallback to SVG (or PNG for IE<9) for lack of good visual rendering for MathML.

For people with visual disabilities using accessible tools, the quality of the visual rendering is less important. We should consider a way to expose the MathML source to these tools. There are at least two of them:

- VoiceOver with Safari. One problem is that the accessibility code relies on some information provided by the MathML "RenderObject", so information is lost when doing "display: none" on the <math>.

- MathPlayer. I don't know if "display: none" affects its ability to read the MathML content (I think MathPlayer uses the DOM).

I guess we could do something similar to what we discuss the "enable MathJax" for anonymous users at some point, that is something to switch from SVG to MathML. That would also be useful for people willing to use the visual rendering of MathPlayer/WebKit.

Alternatively, when MW_MATH_MATHML becomes the default, I could easily write an add-on for safari to switch from SVG to MathML.
Comment 1 Frédéric Wang 2014-06-12 17:26:45 UTC
... and of course there is also ChromeVox :-) I think it uses the DOM too but as for MathPlayer I don't know whether or not it will be able to read display=none MathML.
Comment 2 physikerwelt 2014-06-12 22:07:39 UTC
Yes. That's very important.
But we should ensure that MathML is rendered in Production on Gecko for a large number of visitors in all Languages, before using it as default.
Comment 3 Frédéric Wang 2014-06-13 06:52:45 UTC
(In reply to physikerwelt from comment #2)
> But we should ensure that MathML is rendered in Production on Gecko for a
> large number of visitors in all Languages, before using it as default.

I'm not sure how Gecko's use affects other rendering engines. The idea here is just to have an option for non-Gecko engines to display MathML instead of the fallback when MW_MATH_MATHML is enabled (whether it is the default or chosed by registered users).
Comment 4 Frédéric Wang 2014-10-04 17:42:35 UTC
I wonder whether we want to try something like

https://github.com/Khan/KaTeX/issues/38#issuecomment-55802898

instead of the current "display: none;" on the <math> element. That's similar to what Chris Fleizach suggested to me by mail in the past. That would give a chance to tools based on the native WebKit accessibility tree (e.g. VoiceOver) to read the math. And the "aria-hidden" on the SVG fallback will still be important for DOM-based tools, I guess.
Comment 5 Gerrit Notification Bot 2014-10-04 18:52:53 UTC
Change 164736 had a related patch set uploaded by Frédéric Wang:
Improve the way mathematical formulas are exposed to screen readers.

https://gerrit.wikimedia.org/r/164736
Comment 6 Gerrit Notification Bot 2014-10-05 17:51:29 UTC
Change 164736 merged by Physikerwelt:
Improve the way mathematical formulas are exposed to screen readers.

https://gerrit.wikimedia.org/r/164736
Comment 7 physikerwelt 2014-10-05 17:53:07 UTC
I'll deploy it to the preview server.
Comment 8 Frédéric Wang 2014-10-05 18:08:23 UTC
(In reply to physikerwelt from comment #7)
> I'll deploy it to the preview server.

What is the URL of the preview server and can you tell me when it's live?
Comment 9 physikerwelt 2014-10-05 18:26:32 UTC
I have it deployed to
http://math-preview.wmflabs.org/wiki/Main_Page
The MathML element reads now like
<dt>MathML</dt>
<dd><span><span class="mwe-math-mathml-inline" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML">
  <mrow class="MJX-TeXAtom-ORD">
    <mstyle displaystyle="true">
      <mi>E</mi>
      <mo>=</mo>
      <mi>m</mi>
      <msup>
        <mi>c</mi>
        <mrow class="MJX-TeXAtom-ORD">
          <mn>2</mn>
        </mrow>
      </msup>
    </mstyle>
  </mrow>
</math></span><img class="mwe-math-fallback-svg-inline" style="display: none; vertical-align: -0.167ex; margin-left: 0ex; margin-right: 0ex; margin: 1px 0px;height: 2.167ex; width: 9ex;" src="/w/index.php?title=Special:MathShowImage&amp;hash=826676a6a5ad24552f0d5af1593434cc&amp;mode=5" aria-hidden="true">
<img class="mwe-math-fallback-png-inline" src="/w/index.php?title=Special:MathShowImage&amp;hash=826676a6a5ad24552f0d5af1593434cc&amp;mode=0" aria-hidden="true">
Comment 10 Frédéric Wang 2014-10-05 18:36:36 UTC
Thanks, actually I think it's already in http://deployment.wikimedia.beta.wmflabs.org/wiki/Fourier_transform
Comment 11 Peter Krautzberger 2014-10-06 08:08:57 UTC
Just FYI, MathJax-node can now produce speech-strings (using ChromeVox or MathSpeak rules). This way, both the MathML and the image rendering can become accessible to generic screenreaders (not just MathML-enabled ones).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links