-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Embedding MathML in the output
Peter Krautzberger edited this page Mar 25, 2015
·
2 revisions
For context: https://github.com/mathjax/MathJax/issues/938
Assistive technology (AT) tools (and potentially other tools) need to access MathJax's internal MathML more easily. In particular, AT usually cannot inject JavaScript into the page but can traverse the DOM.
- MathJax attaches ids to all elements of its output (for various reasons)
- if the source includes an id (e.g., a MathML element), this id will be re-used for the corresponding element in the output.
- The new CommonHTML output can be highlighted directly, a highlighting extension for the HTML-CSS output is in the works.
-
Structure of the exposed MathML
- The exposed MathML will correspond to the internal MathML used to generate the output (not necessarily identical to the source)
- Each MathML element will carry an
id
( if preferred: adata-*
attribute) corresponding to theid
of the element corresponding to it in the output. - This allows AT to easily link the MathML structure with the output structure.
-
Options for embedding
- Add a
data-mathml
attribute with serialization of the MathML (with ids)
- mapping to output
- AT will serialize anyway (true?)
- simpler implementation, better performance
- Add hidden MathML directly (without ids)
- MathML is in the DOM
- accessible to DOM exploration
- no mapping to rendering
- rendering needs to be hidden (or aria-describedby used but as discussed this has other problems)
- could be made to work with VoicOver
- Add hidden
<object>
element containing the MathML (with ids).
- MathML in the DOM
- accessible to DOM exploration
- retaining a direct mapping via the ids (since
<object>
elements are a separate document there is no conflict).
- Add a
The team is leaning towards (i.) but we want to implement what works best for AT (or more pricesly, its users).