EPUB 3 Accessibility Guidelines

Descriptions

Although a benefit of native MathML support in XHTML content documents is the ability to provide voicing based on the markup, reading systems capable of such voicings are not likely to appear right away. It is consequently advisable to include a fallback description.

Although natural language descriptions of math equations are a possibility, it is recommended to use MathSpeak to write descriptions. Readers already familiar with math-voicing programs will recognize the conventions used in MathSpeak, and the language removes the potential for ambiguity that natural language can introduce.

Descriptions can be added in one of two ways:

The use of the alttext attribute is only recommended for simple descriptions, since it is limited to 255 text characters. Descriptions that employ the xml-annotation element, on the other hand, are not limited by length and can utilize HTML5 flow content.

Examples

Example 1 — Adding a description using the alttext attribute
<m:math
   xmlns:m="http://www.w3.org/1998/Math/MathML"
   alttext="Frac Root a EndRoot Over b EndFrac">
   
   <m:mfrac>
      <m:msqrt>
         <m:mtext>a</m:mtext>
      </m:msqrt>
      <m:mi>b</m:mi>
   </m:mfrac>
</m:math>
Example 2 — Adding a description using the annotation-xml element
<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">
   <m:semantics>
      <m:mfrac>
         <m:msqrt>
            <m:mtext>a</m:mtext>
         </m:msqrt>
         <m:mi>b</m:mi>
      </m:mfrac>
      <m:annotation-xml
              encoding="application/xhtml+xml"
              name="alternate-representation">
         <span xmlns="http://www.w3.org/1999/xhtml">
            Frac Root a EndRoot Over b EndFrac
         </span>
      </m:annotation-xml>
   </m:semantics>
</m:math>

Compliance References and Standards

Additional Resources

Frequently Asked Questions

Why aren't natural language descriptions advisable?

Consider the simple equation presented in Example 1 above. A reasonable natural language description might be "the square root of a over b". But consider that there are two ways that this statement could be interpreted:

  1. to take the square root of the value a and then divide the resulting value by b.
  2. to divide a by b and then take the square root of the resulting value.

A reader who cannot see the visual presentation of the equation is not going to be able to determine which is the correct interpretation with only the description to go by. MathSpeak takes the ambiguity out of the equation by clearly breaking down the components of the equation in a way that doesn't leave ambiguity.

Is MathSpeak the only option for describing MathML?

No, but it is the most openly documented format. Although some MathML applications take slightly different approaches to voicing equations, MathSpeak is a good reflection of the typical grammar.

Should I use the verbose, brief or super-brief syntaxes?

The different levels reflect the expected age and proficiency of the reader. A math book geared towards younger readers, or readers new to the topic, would typically employ the verbose grammar. More advanced readers already proficient in math and familiar with the grammar will likely find the verbose syntax a nuisance, so either the brief or super-brief grammars can be employed.