Section 1.2 Accessibility
PreFigure prioritizes the creation of accessible mathematical diagrams. In particular, authors can easily include annotations that control how a reader can navigate a diagram using a screen reader.
Diagram Exploration Keyboard Controls
A reader may explore Figure 1.2.1 using a screen reader by first sending the focus to the diagram by either clicking in the diagram or pressing the tab key sufficiently many times. The arrow keys are then used to explore the diagram in more detail. For instance, the Down and Up arrow keys produce more or less detail while the Left and Right arrow keys focus on components at the same level. When the focus is on the graph, pressing "O" will play a sonification of the graph. The annotations are read using the .
diagcess
library created by Volker Sorge1
www.birmingham.ac.uk/staff/profiles/computer-science/academic-staff/sorge-volker
The modifications to the PreFigure source needed to produce the annotations are shown in Listing 1.2.2.
<diagram dimensions="(300, 300)" margins="5">
<definition> a=1 </definition>
<definition> f(x) = exp(x/3)*cos(x) </definition>
<coordinates bbox="[-4,-4,4,4]">
<grid-axes xlabel="x" ylabel="y"/>
<graph at="graph" function='f' />
<tangent-line at="tangent" function="f" point="a"/>
<point at="point" p="(a, f(a))">
<m>(a,f(a))</m>
</point>
</coordinates>
<annotations>
<annotation ref="figure"
text="The graph of a function and its tangent line at the point a equals 1">
<annotation ref="graph-tangent" text="The graph and its tangent line">
<annotation ref="graph" text="The graph of the function f" sonify="yes"/>
<annotation ref="point" text="The point a comma f of a"/>
<annotation ref="tangent" text="The tangent line to the graph of f at the point"/>
</annotation>
</annotation>
</annotations>
</diagram>
Notice that important graphical components are given an
@at
attribute, which serves as a handle to be used by the annotations. The <annotations>
element contains a tree of <annotations>
whose structure specifies how the screen reader will respond to arrow presses. An <annotation>
element contains a reference to the handle of a graphical component, which specifies how the components are highlighted.Furthermore, as seen in Figure 1.2.3 authors can create, from the same XML source, tactile versions of diagrams, including braille labels, suitable for embossing and including in a braille document.
Indeed, the difficulty in creating tactile diagrams that emboss well was one of the original motivations of the PreFigure project.