# Math Accessibility Trees

This post discusses aspects of making mathematical equations accessible to blind people. Equations that are simple typographically, such as πΈ = ππΒ², are accessible with the use of standard left and right arrow key navigation and with each variable and two-dimensional construct being spoken or felt when the insertion point is moved to them. At an insertion point, the user can edit the equation using the regular keyboard input methods, perhaps based on UnicodeMath or LaTeX, or using a refreshable braille display using Nemeth Braille. But it can be hard to visualize a more typographically complex equation, let alone edit it. Instead, the user needs to be able to navigate a complex equation using a mathematical tree of the equation.

More than one kind of tree is possible and this post compares two trees for the equation

Each tree node is labeled with its math text in UnicodeMath along with the type of node. UnicodeMath lends itself to being spoken especially if processed a bit to speak things like πΒ² as βa squaredβ in the current natural language as described in Speaking of mathβ¦. The first kind of tree corresponds to the traditional math layout used in documents, while the second kind corresponds to the mathematical semantics. Accordingly we call the first kind a *display tree* and the second a *semantic tree*.

More specifically, the display tree corresponds to the way TeX and OfficeMath display mathematical text and approximates the way Presentation MathML represents mathematical text. Mathematical layout entities such as fractions, integrals, roots, subscripts and superscripts are represented by nodes in trees. Binary and relational operators that donβt require special typography other than appropriate spacing are included in text nodes. The display tree for the equation above is

ββMath zone ββ β1/2Ο β«_0^2Ο β π/(π+π sinβ‘ π) = 1/β(πΒ²βπΒ²)β ββ β1/2Οβ fraction βΒ Β ββ β1β numerator βΒ Β ββ β2Οβ denominator ββ ββ«_0^2Ο β ΞΈ/(π+π sinβ‘ π)β integral βΒ Β ββ β0β lower limit βΒ Β ββ β2Οβ upper limit βΒ Β ββ ββ ΞΈ/(π+π sinβ‘ π)β integrand βΒ Β Β Β Β ββ ββ ΞΈ/(π+π sinβ‘ π)β fraction βΒ Β Β Β Β Β Β ββ ββ ΞΈβ numerator βΒ Β Β Β Β Β Β ββ βπ+π sinβ‘ΞΈβ denominator βΒ Β Β Β Β Β Β Β Β Β ββ βπ+πβ text βΒ Β Β Β Β Β Β Β Β Β ββ βsinβ‘πβ function apply βΒ Β Β Β Β Β Β Β Β Β Β Β Β ββ βsinβ function name βΒ Β Β Β Β Β Β Β Β Β Β Β Β ββ πβ argument ββ β=β text ββ β1/β(πΒ²βπΒ²)β fraction ββ β1β numerator ββ ββ(πΒ²βπΒ²)β denominator ββ ββ(πΒ²βπΒ²)β radical ββ ββ¬β degree ββ βπΒ²βπΒ²β radicand ββ βπΒ²β superscript βΒ ββ βπβ base Β Β Β Β Β | ββ β2β script ββ βββ text ββ βπΒ²β superscript ββ βπβ base ββ β2β script

Note that the invisible times implicit between the leading fraction and the integral isnβt displayed and the expression π + π sin*ΞΈ* is displayed as a text node π + π followed by a function-apply node sin*ΞΈ*, without explicit nodes for the + and an implied invisible times.

To navigate through the π + π and into the fractions and integral, one can use the usual text left and right arrow keys or their braille equivalents. In OfficeMath, one can navigate through the whole equation with these arrow keys, but itβs helpful also to have coarser grained navigation keys to go between sibling nodes and up to parent nodes. For the sake of discussion, letβs suppose the tree navigation hot keys are those defined in the table

Ctrl+β | Go to next sibling |

Ctrl+β | Go to previous sibling |

Home | Go to parent ahead of current child |

End | Go to parent after current child |

For example starting at the beginning of the equation, Ctrl+β moves past the leading fraction to the integral, whereas β moves to the start of the numerator of the leading fraction. Starting at the beginning of the upper limit, Home goes to the insertion point between the leading fraction and the integral, while End goes to the insertion point in front of the equal sign. Ctrl+β and Ctrl+β allow a user to scan an equation rapidly at any level in the hierarchy. After one of these hot keys is pressed, the linear format for the object at the new position can be spoken in a fashion quite similar to ClearSpeak. When the user finds a position of interest, s/he can use the usual input methods to delete and/or insert new math text.

Now consider the semantic tree, which allocates nodes to all binary and relational operators as well as to fractions, integrals, etc.

ββMath zone ββ β1/2π β«_0^2π β π/(π+π sinβ‘π)=1/β(πΒ²β πΒ²)β ββ β=β text ββ ββ β’β’β implied times β ββ β1/2πβ fraction β β ββ β1β numerator β β ββ β2Οβ denominator β ββ ββ«_0^2π β π/(π+π sinβ‘π)β integral β ββ β0β lower limit β ββ β2Οβ upper limit β ββ ββ π/(π+π sinβ‘π)β integrand β ββ ββ π/(π+π sinβ‘π)β fraction β ββ ββ πβ numerator β β ββ ββ’β β implied times β β ββ ββ β text β β ββ βπβ text β ββ βπ+π sinβ‘πβ denominator β ββ β+β text β ββ βπβ text β ββ βπ sinβ‘πβ function apply β ββ ββ’β β implied times β ββ βπβ text β ββ βsinβ‘πβ function β ββ ββ‘β function apply β ββ βsinβ function name β ββ βπβ argument ββ β1/β(πΒ²β πΒ²)β fraction ββ β1β numerator ββ ββ(πΒ²β πΒ²)β denominator ββ ββ(πΒ²β πΒ²)β radical ββ ββ¬β degree ββ βπΒ²β πΒ²β radicand ββ βββ text ββ βπΒ²β superscript β ββ βπβ base β ββ β2β script ββ βπΒ²β superscript ββ βπβ base ββ β2β script

The semantic tree corresponds to Content MathML. It has drawbacks: 1) itβs bigger and requires more key strokes to navigate, 2) it doesn’t correspond to speech order, and 3) it requires a Polish-prefix mentality. Some people have developed such a mentality, perhaps having used HP calculators, and prefer it. But itβs definitely an acquired taste and it doesnβt correspond to the way that mathematics is conventionally displayed, edited, and spoken. Accordingly the first kind of tree seems significantly better for speech and editing, at least for the math encountered in grades K-12.

The choice for higher-level math is complicated by the fact that the usual meanings for superscripts, vertical bars, and other notation may be incorrect. For example, exponents are usually powers and itβs appropriate to speak πΒ² as βa squaredβ. But in tensor analysis, exponents can be indices and saying them as powers is incorrect. One way around this is to say πΒ² as βa superscript 2β or βa sup 2β, but it would be better to know the authorβs intent and generate more descriptive speech. Another example is |π₯|. In math up through calculus, this is the absolute value of π₯. However, in higher-level math it could mean the cardinality of the set π₯, or something else. In these cases and many others in advanced math, the semantic tree might reveal the authorβs intent better than the display tree.

The MathML working group is studying ways to make Presentation MathML support accurate speech for ambiguous mathematical notations.

Both kinds of trees include nodes defined by the OMML entities listed in the following table along with the corresponding MathML entities

Built-up Office Math Object | OMML tag | MathML |

AccentΒ Β Β Β Β Β Β Β |
acc | mover/munder |

Bar |
bar | mover/munder |

BoxΒ Β Β Β Β Β Β Β |
box | menclose (approx) |

BoxedFormulaΒ Β Β Β |
borderBox | menclose |

Delimiters |
d | mfenced or mrow with moβs |

EquationArray |
eqArr | mtable (with alignment groups) |

Fraction |
f | mfrac |

FunctionApply |
func | mrow with &FunctionApply; |

LeftSubSup |
sPre | mmultiscripts (special case of) |

LowerLimit |
limLow | munder |

Matrix |
m | mtable |

Nary |
nary | mrow followed by msubsup w n-ary mo |

Phantom |
phant | mphantom and/or mpadded |

Radical |
rad | msqrt/mroot |

GroupChar |
groupChr | mover/munder |

Subscript |
sSub | msub |

SubSup |
sSubSup | msubsup |

Superscript |
sSup | msup |

UpperLimit |
limUpp | mover |

Ordinary text |
r | mtext |

MathML has additional nodes, some of which involve infix parsing to recognize, e.g., integrals. The OMML entities were defined for typographic reasons since they require special display handling. Interestingly the OMML entities also include useful semantics, such as identifying integrals and trigonometric functions without special parsing.

In summary, math zones can be made accessible using display trees for which the node contents are spoken in the localized linear format and navigation is accomplished using simple arrow keys, Ctrl arrow keys, and the Home and End keys, or their Braille equivalents. Arriving at any particular insertion point, the user can hear or feel the math text and can edit the text in standard ways.

## 0 comments