Converting Inaccessible STEM Content to Accessible Web Content
Converting Inaccessible STEM Content to Accessible Web Content
Inclusive Publishing Conference, NFB, 1/10/2020
Volker Sorge
Motivation
- STEM content moves online all over higher education
- Covid-19 is a serious driver behind this
- I am concerned about ephemeral publishing
- Every day learning material
- Lecture notes and handouts
- Content in LMS, forums, blogs, etc.
- Academic publishing, research papers, conference proceedings
- When I say STEM, I will be talking about Math, Statistics, Chemistry
Problems
- Poor education about what exists and is possible
- “PDF automatically makes content accessible”
- “Our officers want JPEG graphics; they don't know what to do with SVG.”
- “My level of mathematics cannot be made accessible.”
- “LaTeX documents are for print only”
- “They want me to start using Word”
Learning Outcomes
- Poor information leads to poor design decisions
- Work with authors and the information they can provide
- Do not impede their creativity
- Covid-19 forces a lot of content online. If done badly we might have lost a
valuable opportunity
- Conversion is important
- But never through away information
Aims
- Pragmatically making STEM content accessible on the web
- The technologies and components are already there
- The web is syntax, the semantic has to come from elsewhere
- Note: LaTeX, MathML, CML, MOL, etc. are all only syntax!
- Web technology can embed and hide the semantic
- Suitable semantically rich structure allows for
- Accessibility
- Support of users with diverse needs
- Generation of alternative formats: tactile, audio-tactile, sub-titles etc.
Aims (2)
- Source independence
- Use the sources authors produce
- Tool independence
- Do not require a particular system to author or read in
- Platform independence
- Work with all operating systems, browsers, AT
Sourcing Semantics
- STEM subjects are living languages
- New concepts created everyday
- Potentially infinite
- Trying to capture this in an declarative standard is impossible
Sources of Semantics
- Authors?
- Never rely on authors doing their part
- Even if they are willing they often get it wrong
- Remedial Officers?
- Often lack the expert knowledge
- ALT text is usually not enough!
- Too much content to catch up
- Automatic
- Exploit available sources
- Use intelligent methods to automatically interpret syntax
- Avoid manual intervention as much as possible
Maths Formulas
- How to generate accessible Maths?
- Be careful when you convert your sources...
Convert from Sources
Open source tools for converting maths documents from diverse sources
- Translate a LaTeX or Markdown document with pandoc
pandoc --standalone -t html -o example.html example.md
latexml example.tex | latexmlpost --dest=example.html
pandoc --self-contained -s example.docx -t html -o example.html
Embed Semantics
- Enrich Math using Speech Rule Engine
- Javascript library for translating XML into Speech (markup)
- Open source library available at github
- Only Math speech solution in JavaScript
- Runs in browser, command line, as node module.
- Initially implemented in the context of ChromeVox
- Speech solution for: ChromeVox, MathJax, EquatIO, MathLive, ...
Generate Semantics
ax^2+bx+c=0
<math>
<mi>a</mi>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<mi>b</mi>
<mi>x</mi>
<mo>+</mo>
<mi>c</mi>
<mo>=</mo>
<mn>0</mn>
</math>
Render Accessibly
- For example use MathJax
- A JavaScript library for rendering Mathematics in all browsers
- Input: LaTeX, AsciiMath, and MathML
- Output: HTML/CSS, SVG
- De facto rendering solution of (nearly) all Mathematics on the web
- Uses SRE for accessibility
Example
$$
x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}
$$
Click or focus on the formula and press ENTER to start, Escape to quit.
- Source in LaTeX
- Rendered with MathJax
- Embedded semantics generated with SRE
- Accessibility "built-in"
Multi-modality
- Speech or Braille output (e.g., Nemeth)
- Linear nemeth output
$$ \vec{\nabla} \times \vec{F} =
\left( \frac{\partial F_z}{\partial y} - \frac{\partial F_y}{\partial z} \right) \mathbf{i}
+ \left( \frac{\partial F_x}{\partial z} - \frac{\partial F_z}{\partial x} \right) \mathbf{j}
+ \left( \frac{\partial F_y}{\partial x} - \frac{\partial F_x}{\partial y} \right) \mathbf{k}
$$
- Nemeth is ephemeral and times out on a Braille display
- New standards like
aria-braille-label
might help
Click or focus on the formula and press ENTER to start, Escape to quit.
LaTeX to Nemeth Project
- Project by the NFB, PreTeXt and AIM:
- Rob Beezer (PreTeXt / Pudget Sound)
- David Farmer (PreTeXt / AIM)
- Alexei Kolesnikov (Towson)
- Al Maneki (NFB)
- Martha Siegel (Towson)
- Generating tactile Maths in Braille from PreTeXt Input.
- PreTeXt is a XML markup with LaTeX maths
- Mainly used for open source textbooks
LaTeX to Nemeth
- PreTeXt books are translated automatically into Braille with
- Liblouis for the text
- MathJax for formulas using SRE's Nemeth translation
- Multistep translation pipeline server-side using MathJax3
- Current pipeline is mainly a prototype
- Tactile graphics still primarily done manually
LaTeX to Nemeth (Current State)
- Two books partially translated (Abstract Algebra, Calculus)
- Bugs discovered in SRE (few fixed)
- Aim workshop in August
- Report for BANA on missing Nemeth constructs
LaTeX to Nemeth (Potential)
- Improve pipeline and Nemeth translation
- Working on 2D layout structures and diagrams
- Automate translation of graphics to tactiles
- Reasonably support transcribers
- Extend from PreTeXt to any LaTeX
DON'T Rely on Single Standards
- Try to express this in MathML:
$$
\begin{prooftree}
\AxiomC{}
\RightLabel{$Hyp^{1}$}
\UnaryInfC{$P$}
\AXC{$P\to Q$}
\RL{$\to_E$}
\BIC{$Q^2$}
\AXC{$Q\to R$}
\RL{$\to_E$}
\BIC{$R$}
\AXC{$Q$}
\RL{Rit$^2$}
\UIC{$Q$}
\RL{$\wedge_I$}
\BIC{$Q\wedge R$}
\RL{$\to_I^1$}
\UIC{$P\to Q\wedge R$}
\end{prooftree}
$$
Click or focus on the formula and press ENTER to start, Escape to quit.
... or Single Sources
- Use PDF as a source
- Existing work: MaxTract (over 10 years old), Infty
- Ongoing project with the AssisTech Group IIT Delhi
- Resurrects an old project of mine: MaxTract (the good parts)
- Translate inaccessible PDF into accessible ePub
- We use pdf2htmlEX
- Builds a client side accessible rendering for PDF documents
- Runs server-side with puppeteer
- Can handle Maths, Tables, some diagrams
What about Diagrams?
- Semantic representations?
- SVG is an ideal container format:
- Highly structured
- Embedding of hierarchical content
- Foreign objects embedded via namespaces
- Muliple views on content
- Support of diverse audiences
- Multi-modal output
- Sources can be images, unique identifiers, models, etc.
Generate with Knowledge
- Easiest way to embed knowledge is, if I know what I am talking about
- Data visualisations directly generated from statistical models
- Authors do not even realise that it is accessible out of the box
- Example: R statistics package
- BrailleR package by Jonathan Godfrey
- I added web accessiblitiy
- Other examples: HighCharts
- Other domains: Org charts from Office software using stylesheet
transformations
Example: Accessible Statistics
graphics-plot-1-main-1.11chartgraphics-plot-1-xlab-1.11xaxisgraphics-plot-1-bottom-axis-line-1.11xaxisgraphics-plot-1-bottom-axis-labels-1.1.12xaxisgraphics-plot-1-bottom-axis-ticks-1.1.1graphics-plot-1-bottom-axis-ticks-1.1.11xaxisgraphics-plot-1-bottom-axis-labels-1.1.1graphics-plot-1-bottom-axis-labels-1.1.23xaxisgraphics-plot-1-bottom-axis-ticks-1.1.2graphics-plot-1-bottom-axis-ticks-1.1.21xaxisgraphics-plot-1-bottom-axis-labels-1.1.2graphics-plot-1-bottom-axis-labels-1.1.34xaxisgraphics-plot-1-bottom-axis-ticks-1.1.3graphics-plot-1-bottom-axis-ticks-1.1.31xaxisgraphics-plot-1-bottom-axis-labels-1.1.3graphics-plot-1-bottom-axis-labels-1.1.45xaxisgraphics-plot-1-bottom-axis-ticks-1.1.4graphics-plot-1-bottom-axis-ticks-1.1.41xaxisgraphics-plot-1-bottom-axis-labels-1.1.4graphics-plot-1-bottom-axis-labels-1.1.56xaxisgraphics-plot-1-bottom-axis-ticks-1.1.5graphics-plot-1-bottom-axis-ticks-1.1.51xaxisgraphics-plot-1-bottom-axis-labels-1.1.5xaxis2chartgraphics-plot-1-xlab-1.1graphics-plot-1-bottom-axis-labels-1.1.1graphics-plot-1-bottom-axis-labels-1.1.2graphics-plot-1-bottom-axis-labels-1.1.3graphics-plot-1-bottom-axis-labels-1.1.4graphics-plot-1-bottom-axis-labels-1.1.5graphics-plot-1-xlab-1.1graphics-plot-1-bottom-axis-line-1.1graphics-plot-1-bottom-axis-labels-1.1.1graphics-plot-1-bottom-axis-ticks-1.1.1graphics-plot-1-bottom-axis-labels-1.1.2graphics-plot-1-bottom-axis-ticks-1.1.2graphics-plot-1-bottom-axis-labels-1.1.3graphics-plot-1-bottom-axis-ticks-1.1.3graphics-plot-1-bottom-axis-labels-1.1.4graphics-plot-1-bottom-axis-ticks-1.1.4graphics-plot-1-bottom-axis-labels-1.1.5graphics-plot-1-bottom-axis-ticks-1.1.5graphics-plot-1-ylab-1.11yaxisgraphics-plot-1-left-axis-line-1.11yaxisgraphics-plot-1-left-axis-labels-1.1.12yaxisgraphics-plot-1-left-axis-ticks-1.1.1graphics-plot-1-left-axis-ticks-1.1.11yaxisgraphics-plot-1-left-axis-labels-1.1.1graphics-plot-1-left-axis-labels-1.1.23yaxisgraphics-plot-1-left-axis-ticks-1.1.2graphics-plot-1-left-axis-ticks-1.1.21yaxisgraphics-plot-1-left-axis-labels-1.1.2graphics-plot-1-left-axis-labels-1.1.34yaxisgraphics-plot-1-left-axis-ticks-1.1.3graphics-plot-1-left-axis-ticks-1.1.31yaxisgraphics-plot-1-left-axis-labels-1.1.3graphics-plot-1-left-axis-labels-1.1.45yaxisgraphics-plot-1-left-axis-ticks-1.1.4graphics-plot-1-left-axis-ticks-1.1.41yaxisgraphics-plot-1-left-axis-labels-1.1.4yaxis3chartgraphics-plot-1-ylab-1.1graphics-plot-1-left-axis-labels-1.1.1graphics-plot-1-left-axis-labels-1.1.2graphics-plot-1-left-axis-labels-1.1.3graphics-plot-1-left-axis-labels-1.1.4graphics-plot-1-ylab-1.1graphics-plot-1-left-axis-line-1.1graphics-plot-1-left-axis-labels-1.1.1graphics-plot-1-left-axis-ticks-1.1.1graphics-plot-1-left-axis-labels-1.1.2graphics-plot-1-left-axis-ticks-1.1.2graphics-plot-1-left-axis-labels-1.1.3graphics-plot-1-left-axis-ticks-1.1.3graphics-plot-1-left-axis-labels-1.1.4graphics-plot-1-left-axis-ticks-1.1.4center4chartboxplot1boxplot2boxplot3boxplot4boxplot5graphics-root.8graphics-root.10graphics-root.12graphics-root.11graphics-root.14graphics-root.16graphics-root.18graphics-root.20graphics-root.19graphics-root.22graphics-root.24graphics-root.26graphics-root.28graphics-root.27graphics-root.30graphics-root.32graphics-root.34graphics-root.33graphics-root.36graphics-root.38graphics-root.40graphics-root.39graphics-plot-1-points-8.1.3graphics-plot-1-points-8.1.2graphics-plot-1-points-8.1.4graphics-plot-1-points-8.1.1graphics-plot-1-box-1.1.1boxplot11centergraphics-root.8graphics-root.12graphics-root.11graphics-root.14graphics-root.8graphics-root.10graphics-root.12graphics-root.11graphics-root.14graphics-root.81boxplot1graphics-root.102boxplot1graphics-root.123boxplot1graphics-root.114boxplot1graphics-root.145boxplot1boxplot22centergraphics-root.16graphics-root.20graphics-root.19graphics-root.22graphics-root.16graphics-root.18graphics-root.20graphics-root.19graphics-root.22graphics-root.161boxplot2graphics-root.182boxplot2graphics-root.203boxplot2graphics-root.194boxplot2graphics-root.225boxplot2boxplot33centergraphics-root.24graphics-root.28graphics-root.27graphics-root.24graphics-root.26graphics-root.28graphics-root.27graphics-root.241boxplot3graphics-root.262boxplot3graphics-root.283boxplot3graphics-root.274boxplot3boxplot44centergraphics-root.30graphics-root.34graphics-root.33graphics-root.30graphics-root.32graphics-root.34graphics-root.33graphics-root.301boxplot4graphics-root.322boxplot4graphics-root.343boxplot4graphics-root.334boxplot4boxplot55centergraphics-root.36graphics-root.40graphics-root.39outliers5graphics-root.36graphics-root.38graphics-root.40graphics-root.39graphics-plot-1-points-8.1.3graphics-plot-1-points-8.1.2graphics-plot-1-points-8.1.4graphics-plot-1-points-8.1.1graphics-root.361boxplot5graphics-root.382boxplot5graphics-root.403boxplot5graphics-root.394boxplot5outliers55boxplot5graphics-plot-1-points-8.1.3graphics-plot-1-points-8.1.2graphics-plot-1-points-8.1.4graphics-plot-1-points-8.1.1graphics-plot-1-points-8.1.3graphics-plot-1-points-8.1.2graphics-plot-1-points-8.1.4graphics-plot-1-points-8.1.1graphics-plot-1-points-8.1.31outliers5graphics-plot-1-points-8.1.21outliers5graphics-plot-1-points-8.1.41outliers5graphics-plot-1-points-8.1.11outliers5graphics-plot-1-box-1.1.10centerchart1graphics-plot-1-main-1.1xaxisyaxiscentergraphics-plot-1-main-1.1graphics-plot-1-xlab-1.1graphics-plot-1-bottom-axis-line-1.1graphics-plot-1-bottom-axis-labels-1.1.1graphics-plot-1-bottom-axis-ticks-1.1.1graphics-plot-1-bottom-axis-labels-1.1.2graphics-plot-1-bottom-axis-ticks-1.1.2graphics-plot-1-bottom-axis-labels-1.1.3graphics-plot-1-bottom-axis-ticks-1.1.3graphics-plot-1-bottom-axis-labels-1.1.4graphics-plot-1-bottom-axis-ticks-1.1.4graphics-plot-1-bottom-axis-labels-1.1.5graphics-plot-1-bottom-axis-ticks-1.1.5graphics-plot-1-ylab-1.1graphics-plot-1-left-axis-line-1.1graphics-plot-1-left-axis-labels-1.1.1graphics-plot-1-left-axis-ticks-1.1.1graphics-plot-1-left-axis-labels-1.1.2graphics-plot-1-left-axis-ticks-1.1.2graphics-plot-1-left-axis-labels-1.1.3graphics-plot-1-left-axis-ticks-1.1.3graphics-plot-1-left-axis-labels-1.1.4graphics-plot-1-left-axis-ticks-1.1.4graphics-root.8graphics-root.10graphics-root.12graphics-root.11graphics-root.14graphics-root.16graphics-root.18graphics-root.20graphics-root.19graphics-root.22graphics-root.24graphics-root.26graphics-root.28graphics-root.27graphics-root.30graphics-root.32graphics-root.34graphics-root.33graphics-root.36graphics-root.38graphics-root.40graphics-root.39graphics-plot-1-points-8.1.3graphics-plot-1-points-8.1.2graphics-plot-1-points-8.1.4graphics-plot-1-points-8.1.1graphics-plot-1-box-1.1.1
Click or focus on the diagram and press A to start, Escape to quit, Escape to quit.
Get Semantics from Scratch
- Image analysis and recognition
- Alternatively: Unique Identifiers
- Generation of annotated SVG
- Semantic enrichment
- Recursively identify major components
- Use web services for naming
- Generate hierarchical navigation structure
Chemistry Example
a13 a1 a6 a7 a23 a27 a11 a32 a17a13 a7 a1 a17 a6 a27a1 a17 a11 a32 a23a2 a10 a18 a22 a31 a8 a9 a26 a12a2 a12 a8 a18 a31a2 a12 a10 a9 a22 a26a33 a24 a11 a28 a19 a25a5 a4 a14 a15 a3 a16a20 a29 a21 a30a34 a14a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34a1as21b2b13a7b22a17b136a23b190a1as34b13b19a7b20a17b133a23b195a2as55b32b5a12b54a26b220a31b321a2as61b5b22a12b52a26b226a31b320a3as85b12b8a14b84a16b126a4as82b10b1a5b11a15b103a5as81b11b1a4b12a16b116a31b330a6as25b14b24a17b146a27b244a7as22b2b7a1b21a13b73a8as53b4b16a12b44a18b162a20b170a9as64b3b18a10b33a22b185a10as63b3b6a9b34a12b62a11as32b35b15a17b153a25b200a28b260a32b351a11as74b20b26a17b150a25b205a28b263a32b350a12as54b4b5a8b43a2b55a10b60a12as62b5b6a8b40a2b51a10b63a13as23b25b7a7b72a27b254a14as84b8b9a3b85a15b93a34b390a14as101b39a3b80a15b90a34b392a15as83b10b9a14b94a4b102a16as86b12b11a5b111a3b125a17as26b14b13a1b131a6b145a11b150a17as33b13b15a1b134a6b140a11b152a18as52b31b16a8b163a31b311a19as72b36b27a28b273a33b361a20as91b29a8b170a29b292a21as93b28b30a29b282a30b304a22as65b23b18a9b184a26b236a23as35b34b19a1b194a32b341a24as76b21b38a25b215a33b381a25as75b21b20a11b204a24b216a26as66b23b22a2b221a22b235a27as24b25b24a6b245a13b253a28as73b27b26a11b264a19b272a29as92b29b28a21b283a20b291a30as94b30a21b303a33b370a31as51b32b31a18b312a2b325a5b330a32as31b34b35a23b345a11b352a33as71b36b38a19b362a30b370a24b386a34as102b39a14b391b11a4a5b21a1a7b31a9a10b41a8a12b51a2a12b61a10a12b71a7a13b81a3a14b91a14a15b101a4a15b111a5a16b121a3a16b131a1a17b141a6a17b151a11a17b161a8a18b171a8a20b181a9a22b191a1a23b201a11a25b211a24a25b221a2a26b231a22a26b241a6a27b251a13a27b261a11a28b271a19a28b281a21a29b291a20a29b301a21a30b311a18a31b321a2a31b331a5a31b341a23a32b351a11a32b361a19a33b371a30a33b381a24a33b391a14a34as1as111as2as3a1a6a7a11a13a17a23a27a32b2b7b13b14b15b19b24b25b34b35as2as12a1a6a7a13a17a27a1a6a7a13a17a27b2b7b13b14b24b25as3a11a176b130as3as11a1a11a17a23a32a1a11a17a23a32b13b15b19b34b35as7a112as2a14a173b130as4as114as5as6a2a8a9a10a12a18a22a26a31b3b4b5b6b16b18b22b23b31b32as9b173as8b331as5as41a2a8a12a18a31a2a8a12a18a31b4b5b16b31b32as6a25a124b50as6as42a2a9a10a12a22a26a2a9a10a12a22a26b3b5b6b18b22b23as5a21a122b50as7as112a11a19a24a25a28a33a11a19a24a25a28a33b20b21b26b27b36b38as1a114as9b371as8as115a3a4a5a14a15a16a3a4a5a14a15a16b1b8b9b10b11b12as10a144as4b331as9as113a20a21a29a30a20a21a29a30b28b29b30as4b171as7b374as10as116a14a34a14a34b39as8a141as111as1as4as7as8as9as10a1a2a3a4a5a6a7a8a9a10a11a12a13a14a15a16a17a18a19a20a21a22a23a24a25a26a27a28a29a30a31a32a33a34b1b2b3b4b5b6b7b8b9b10b11b12b13b14b15b16b17b18b19b20b21b22b23b24b25b26b27b28b29b30b31b32b33b34b35b36b37b38b39
Click or focus on the diagram and press A to start.
Test Live
Live web service
- Pilot project with a number of Institutions
- Project with LibreText
Combined in STEM Documents
Conclusions
- Basic mechanisms for accessible STEM on the web are available
- We just have to use them right
- Let's not be too hung-up on standards
- Always avoid limiting the creativity of authors
- We need more emphasis on
- automatic interpretation,
- machine learning and understanding
- implementation of flexible workflows
Next steps
- Covid-19:
- Organisations are forced to move content online
- If done badly, it will be a lost opportunity!
- Preserving the knowledge is most important!
- Education is important
- AMS training workshops: How to move Maths online