Accessibility/MathML: Difference between revisions

Added potential roles and relations alongside the background information.
(Changed proposed relation names.)
(Added potential roles and relations alongside the background information.)
Line 12: Line 12:


The following includes descriptions and examples for the various types of MathML elements for the purpose of this document.
The following includes descriptions and examples for the various types of MathML elements for the purpose of this document.
Some examples are pulled from MDN.
Some examples are pulled from MDN.  Information about potential roles and relations will be included alongside the elements they cover.


===Tokens===
===Tokens===
Line 50: Line 50:
[[File:MathML-tokens.png|frame|left|The above describes y + 10, arbitrary text, an interpreted string literal, and a glyph (an image of x).  Rendered using MathJax due to lack of glyph support in Gecko.]]
[[File:MathML-tokens.png|frame|left|The above describes y + 10, arbitrary text, an interpreted string literal, and a glyph (an image of x).  Rendered using MathJax due to lack of glyph support in Gecko.]]
<br clear=all>
<br clear=all>
====Potential role mappings====
* mi = MATHML_IDENTIFIER
* mn = MATHML_NUMBER
* mo = MATHML_OPERATOR
* mtext = MATHML_TEXT
* mspace = MATHML_SPACE
* ms = MATHML_STRING_LITERAL
* mglyph = MATHML_GLYPH


===Layout===
===Layout===
Line 117: Line 126:
[[File:MathML-layout-semantics.png|frame|left|The above describes (x+y) + 2, x/2 as a fraction, the square root of 2, the 5th root of x, a 3D vector (x, y, z), and (a + b) circled.  Rendered using Gecko.]]
[[File:MathML-layout-semantics.png|frame|left|The above describes (x+y) + 2, x/2 as a fraction, the square root of 2, the 5th root of x, a 3D vector (x, y, z), and (a + b) circled.  Rendered using Gecko.]]
<br clear=all>
<br clear=all>
=====Potential role mappings=====
* mrow = MATHML_ROW
* mfrac = MATHML_FRACTION
* msqrt = MATHML_SQUARE_ROOT
* mroot = MATHML_ROOT
* mfenced = MATHML_FENCED
* menclose = MATHML_ENCLOSED
=====Potential relations=====
* row to children: MATHML_ROW_FOR
* children to row: MATHML_IN_ROW
* numerator to fraction: MATHML_NUMERATOR_OF
* fraction to numerator: MATHML_NUMERATOR
* denominator to fraction: MATHML_DENOMINATOR_OF
* fraction to denominator: MATHML_DENOMINATOR
* radicand to root: MATHML_RADICAND_OF
* root to radicand: MATHML_RADICAND
* root index to root: MATHML_ROOT_INDEX_OF
* root to root index: MATHML_ROOT_INDEX


====Formatting====
====Formatting====
Line 143: Line 172:
[[File:MathML-layout-formatting.png|frame|left|The above describes the expression "x + y" rendered in blue from right to left, with extra padding, and with the "+ y" not displayed.  Rendered using Gecko.]]
[[File:MathML-layout-formatting.png|frame|left|The above describes the expression "x + y" rendered in blue from right to left, with extra padding, and with the "+ y" not displayed.  Rendered using Gecko.]]
<br clear=all>
<br clear=all>
=====Potential role mappings=====
* mstyle = MATHML_STYLE
* mpadded = MATHML_PADDED
* mphantom = MATHML_PHANTOM


====Elementary math====
====Elementary math====
Line 192: Line 226:
[[File:MathML-layout-elementary.png|frame|left|300px|The above describes the subtraction of 15 from 523, with a borrow from the ten's column to the one's column, as well as the division of 5 by 5 resulting in 1.  Rendered using the MathML-mml3ff addon with Gecko as elementary math support is not natively available in Gecko.]]
[[File:MathML-layout-elementary.png|frame|left|300px|The above describes the subtraction of 15 from 523, with a borrow from the ten's column to the one's column, as well as the division of 5 by 5 resulting in 1.  Rendered using the MathML-mml3ff addon with Gecko as elementary math support is not natively available in Gecko.]]
<br clear=all>
<br clear=all>
=====Potential role mappings=====
* mstack = MATHML_STACK
* mlongdiv = MATHML_LONG_DIVISION
* msgroup = MATHML_STACK_GROUP
* msrow = MATHML_STACK_ROW
* mscarries = MATHML_STACK_CARRIES
* mscarry = MATHML_STACK_CARRY
* msline = MATHML_STACK_LINE


===Scripts and limits===
===Scripts and limits===
Line 243: Line 286:
[[File:MathML-scripts-limits.png|frame|left|The above describes the base b with subscript 1 and superscript 2, the summation of n from 1 to 5 being 15, and x with post-superscript a and pre-subscript b.  Rendered using Gecko.]]
[[File:MathML-scripts-limits.png|frame|left|The above describes the base b with subscript 1 and superscript 2, the summation of n from 1 to 5 being 15, and x with post-superscript a and pre-subscript b.  Rendered using Gecko.]]
<br clear=all>
<br clear=all>
====Potential role mappings====
* msub = MATHML_SUB
* msup = MATHML_SUP
* msubsup = MATHML_SUB_SUP
* munder = MATHML_UNDER
* mover = MATHML_OVER
* munderover = MATHML_UNDER_OVER
* mmultiscripts = MATHML_MULTISCRIPTS
====Potential relations====
* underscript to parent structure (munder/munderover): MATHML_UNDER_OF
* parent structure to underscript: MATHML_UNDER
* overscript to parent structure (mover/munderover): MATHML_OVER_OF
* parent structure to overscript: MATHML_OVER
* base to parent structure (munder, mover, munderover, msub, msup, msubsup, mmultiscripts): MATHML_BASE_OF
* parent structure to base: MATHML_BASE
* subscript to parent structure (msub, msubsup): MATHML_SUBSCRIPT_OF
* parent structure to subscript: MATHML_SUBSCRIPT
* superscript to parent structure (msup, msubsup): MATHML_SUPERSCRIPT_OF
* parent structure to superscript: MATHML_SUPERSCRIPT
* pre-subscript to parent structure (mmultiscripts): MATHML_PRE_SUBSCRIPT_OF
* parent structure to pre-subscript: MATHML_PRE_SUBSCRIPT
* pre-superscript to parent structure (mmultiscripts): MATHML_PRE_SUPERSCRIPT_OF
* parent structure to pre-superscript: MATHML_PRE_SUPERSCRIPT
* post-subscript to parent structure (mmultiscripts): MATHML_POST_SUBSCRIPT_OF
* parent structure to post-subscript: MATHML_POST_SUBSCRIPT
* post-superscript to parent structure (mmultiscripts): MATHML_POST_SUPERSCRIPT_OF
* parent structure to post-superscript: MATHML_POST_SUPERSCRIPT


===Tables/matrices===
===Tables/matrices===
Line 350: Line 422:
[[File:MathML-tables-matrices.png|frame|left|The above describes the two-by-two identity matrix, the equation to determine the volume of a sphere, and two aligned equations.  Rendered using MathJax due to lack of support of mlabeledtr, maligngroup, and malignmark in Gecko.]]
[[File:MathML-tables-matrices.png|frame|left|The above describes the two-by-two identity matrix, the equation to determine the volume of a sphere, and two aligned equations.  Rendered using MathJax due to lack of support of mlabeledtr, maligngroup, and malignmark in Gecko.]]
<br clear=all>
<br clear=all>
====Potential role mappings====
* mtable = MATHML_TABLE
* mtr = MATHML_LABELED_ROW
* mlabeledtr = MATHML_TABLE_ROW
* mtd = MATHML_CELL
* maligngroup = MATHML_ALIGNMENT_GROUP
* malignmark = MATHML_ALIGNMENT_MARK


===Semantics annotation===
===Semantics annotation===
Line 397: Line 477:
[[File:MathML-semantics-annotation.png|frame|left|The above is the square of x added to y, with the content also annotated (invisibly) as Content MathML and TeX markup.  Rendered using Gecko.]]
[[File:MathML-semantics-annotation.png|frame|left|The above is the square of x added to y, with the content also annotated (invisibly) as Content MathML and TeX markup.  Rendered using Gecko.]]
<br clear=all>
<br clear=all>
====Potential role mappings====
* semantics = MATHML_SEMANTICS
* annotation = MATHML_ANNOTATION
* annotation-xml = MATHML_XML_ANNOTATION


===Other===
===Other===
Line 452: Line 537:
[[File:MathML-other-action.gif|frame|left|The above is a togglable expression displaying 6/8, (3*2)/(4*2), and 3/4 upon each mouse press.  Rendered using Gecko.]]
[[File:MathML-other-action.gif|frame|left|The above is a togglable expression displaying 6/8, (3*2)/(4*2), and 3/4 upon each mouse press.  Rendered using Gecko.]]
<br clear=all>
<br clear=all>
====Potential role mappings====
* maction = MATHML_ACTION
* merror = MATHML_ERROR


=Interface=
=Interface=
29

edits