RE: MATHML DOM question

Doug, 
Most helpful. And just the right amount of info.
Jim

> -----Original Message-----
> From: Doug Schepers [mailto:schepers@w3.org]
> Sent: Tuesday, August 03, 2010 3:50 PM
> To: jimallan@tsbvi.edu
> Cc: 'Jeanne Spellman'
> Subject: Re: MATHML DOM question
> 
> Hi, Jim, Jeanne-
> 
> Jim Allan wrote (on 8/3/10 4:26 PM):
> > See below
> >
> >>  -----Original Message-----
> >>  From: Jeanne Spellman [mailto:jeanne@w3.org]
> >>  Sent: Tuesday, August 03, 2010 3:10 PM
> >>  To: Jim Allan; Doug Schepers
> >>  Subject: MATHML DOM question
> >>
> >>  Doug meet Jim, Jim meet Doug,
> >>
> >>  The User Agent Accessibility Working Group is meeting to write a
> >> technical  support document. A question came up about the DOM and
> accessibility.
> >>  Here is Jim's question (as paraphrased by me, you may get more info
> >> from  Jim directly).
> >>
> >>  With MathML: Now that MathML is rendered natively in say, Firefox,
> >> does it  still have two DOMs - one for HTML processing and one for
> >> MATHML  processing?
> >
> > And, if there are 2 separate DOMs does the user agent expose the
> > MATHML DOM to the accessibility API?
> 
> 
> Short answer: there is a single DOM, and it should be exposed to the
> accessibility API.
> 
> 
> Longer, more technical answer:
> 
> First, you have to break the idea of a DOM into 2 aspects:
> 1) the memory representation
> 2) the interfaces defined for each element (and attribute), i.e. methods
> and properties
> 
> MathML is an easy case (as far as compound documents go), because as far
> I know, they don't describe any special interfaces specifically for
> MathML; it just uses the regular DOM, with few if any extensions.
> 
> And you also have to look at two usage scenarios:
> a) inline content: a single document containing a mixture of HTML,
> MathML, SVG, etc.
> b) referenced content: multiple documents integrated via referencing
> elements (such as <img>, <object>, <embed>, etc.)
> 
> Let's assume you're talking about (b), since that is the most natural
> way for an author to include it.  This means a single document with both
> HTML and MathML (see snippet [1]... note that it could also be
> SVG+MathML, the principle is the same).  That document would result in a
> single memory representation; that is, the user agent would have a
> single 'document' object with a bunch of child nodes, like a 'body',
> 'p', 'mfrac', etc., from different namespaces (languages), but all
> readable from memory in the same way, and all as children of the same
> document.  If MathML were to have special methods and properties, this
> document would have all the shared interfaces, and each element (child
> node) in it would have the element-specific methods, as well.
> 
> For standalone MathML documents (not mixed with HTML or SVG), of course,
> the memory representation would just be the MathML document, and would
> only have those interfaces.
> 
> 
> Okay, all that said, an accessibility API would have to know how to read
> MathML in order to take advantage of this fact.  And an AT really should
> have special ways of presenting MathML that are more helpful to e.g. the
> visually impaired than treating it as simple text; it should allow the
> user to explore the equation or math snippet (for myself, simply hearing
> or reading the text string in sequence is rarely good enough, and I'm
> sighted).  I have no idea what the state of AT support for MathML is.
> 
> 
> I hope that answers your question.  Let me know if you need any more (or
> less).
> 
> 
> [1] An inline HTML+MathML snippet:
> <html><body>
> <p>The solution for quadratic equations is
> <math>
>    <mi>x</mi>
>    <mo>=</mo>
>    <mfrac>
>      <mrow>
>        <mo>&minus;</mo>
>        <mi>b</mi>
> 
>        <mo>&PlusMinus;</mo>
>        <msqrt>
>          <msup>
>            <mi>b</mi>
>            <mn>2</mn>
>          </msup>
>          <mo>&minus;</mo>
>          <mn>4</mn>
> 
>          <mo>&InvisibleTimes;</mo>
>          <mi>a</mi>
>          <mo>&InvisibleTimes;</mo>
>          <mi>c</mi>
>        </msqrt>
>      </mrow>
>      <mrow>
>        <mn>2</mn>
> 
>        <mo>&InvisibleTimes;</mo>
>        <mi>a</mi>
>      </mrow>
>    </mfrac>
> </math>.</p>
> <p><b>Warning:</b> Remember that &PlusMinus; means that there are two
> solutions!</p>
> </body></html>
> 
> Regards-
> -Doug Schepers
> W3C Team Contact, SVG and WebApps WGs

Received on Tuesday, 3 August 2010 20:57:02 UTC