I am opening an issue to discuss and develop an interop strategy for mixed SVG+MathML(+HTML) content, starting with existing examples from math practice.
Three examples:
SVG as a host language (<foreignObject> would be the typical host for inner MathML).
- idea: Any diagram that is not oriented via the usual baseline fits better as an SVG. For this example, here is an up-right-diagonal arrow operator between two nodes, where the source/target math objects are wrapped in a ``, as is the math object annotating the arrow (which explains the transformation).
```html
```
- sample rendering:
MathML as host language (<mtext> and <mglyph> would be usual carriers for SVG inside MathML).
- idea: An arrow operator between two variables in `` nodes, where the arrow is itself annotated with a MathML object.
```html
```
- sample rendering:
Simple MathML and HTML mixing.
- idea: As a simplest example, take a list of three variables: $x_i, y_i,\text{ and }z_i$, where `and` is additionally emphasized via an HTML `` element.
- option 1: Host in HTML, with MathML tightly capturing variable names
```html
,
,
and
```
- option 2: Host in MathML, using `` for interleaved text (and other HTML-grade material)
```html
```
minor note: the SVG examples have been generated with help from latexml's Tikz support (then trimmed down for size).
The question I would like to open with these examples is how to further annotate them for accessibility, and how the different AT systems should interoperate.
SVG has a range of options for annotating accessible walks through a diagram, using its <title> element on each sub-component, as well as ARIA's role, aria-labelledby and aria-describedby attributes. I likely do not know the best resource to link to, but I found a reasonable example diagram from svg-access-w3cg, namely composed-tree.svg.
The natural connection is that for a given MathML element <math id="mid"> one can use the id attribute in an ARIA annotation, such as from an outer SVG <g aria-labelledby="id1 ... mid ... idn"> to indicate the right traversal order. This is also the likely mechanism if we are annotating regular HTML nodes.
Similarly, the MathML Intent mechanism allows to indicate e.g. <mtext arg="diagram"><svg>...</svg></mtext> and point to this SVG wrapper node via the reference syntax $diagram from some outer ancestor node. A basic use is <mrow intent="$diagram(A,B)">...</mrow>.
It would be great if we could have a cross-group discussion if these kinds of constructions are already 1) possible to annotate, 2) easy to evaluate by AT and 3) good enough for MathML 4. I think most importantly we need to find out if AT vendors find it possible to interoperate.
As a possible alternative, one could consider if the intent mechanism could also be suggested for adoption and use in SVG diagrams, given the added convenience of annotating full tree structures, over the simple flat list of ids offered by ARIA (which may require additional scaffold elements).
And an explicit CC to @bkardell and @NSoiffer , who expressed interest in developing a few meaningful examples, before deciding on next steps.
I am opening an issue to discuss and develop an interop strategy for mixed SVG+MathML(+HTML) content, starting with existing examples from math practice.
Three examples:
SVG as a host language (
<foreignObject>
would be the typical host for inner MathML).MathML as host language (
<mtext>
and<mglyph>
would be usual carriers for SVG inside MathML).Simple MathML and HTML mixing.
minor note: the SVG examples have been generated with help from latexml's Tikz support (then trimmed down for size).
The question I would like to open with these examples is how to further annotate them for accessibility, and how the different AT systems should interoperate.
SVG has a range of options for annotating accessible walks through a diagram, using its
<title>
element on each sub-component, as well as ARIA'srole
,aria-labelledby
andaria-describedby
attributes. I likely do not know the best resource to link to, but I found a reasonable example diagram from svg-access-w3cg, namely composed-tree.svg.The natural connection is that for a given MathML element
<math id="mid">
one can use the id attribute in an ARIA annotation, such as from an outer SVG<g aria-labelledby="id1 ... mid ... idn">
to indicate the right traversal order. This is also the likely mechanism if we are annotating regular HTML nodes.Similarly, the MathML Intent mechanism allows to indicate e.g.
<mtext arg="diagram"><svg>...</svg></mtext>
and point to this SVG wrapper node via the reference syntax$diagram
from some outer ancestor node. A basic use is<mrow intent="$diagram(A,B)">...</mrow>
.It would be great if we could have a cross-group discussion if these kinds of constructions are already 1) possible to annotate, 2) easy to evaluate by AT and 3) good enough for MathML 4. I think most importantly we need to find out if AT vendors find it possible to interoperate.
As a possible alternative, one could consider if the
intent
mechanism could also be suggested for adoption and use in SVG diagrams, given the added convenience of annotating full tree structures, over the simple flat list of ids offered by ARIA (which may require additional scaffold elements).And an explicit CC to @bkardell and @NSoiffer , who expressed interest in developing a few meaningful examples, before deciding on next steps.