Math Accessibility Trees

Murray Sargent

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 Image integral

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.



Discussion is closed.

Feedback usabilla icon