Contents

Accessibility

The project

Accessibility

A page made with ReflowTEX can carry, next to each block, the text a screen reader needs: the words in reading order, and every formula as MathML. VoiceOver reads MathML aloud and lets the reader step through a formula part by part.

The MathML is written by LA TEX itself, with the luamml package, where the author asks for it at the top of the document: \DocumentMetadata{tagging=on}, and for the classic fonts \tagpdfsetup{math/mathml/luamml/load=true}. Every block on this site does. A document without it keeps its text for the reader, formulas as their characters, and no MathML is made up for it.

Each formula also carries its spoken form, written when the page is built. A reader who would rather hear that can choose it: the formula is then read as part of the sentence, without a stop at every symbol. The choice is in the reading options, under Formulas for screen readers, and in the switch below.

The picture shows the beginning of AMS testmath.tex. The orange boxes are where the hidden text lies; a screen reader outlines them as it reads. Under each line is what it is given there.

Formulas for screen readers

1 Introduction

1 Introduction

This paper contains examples of various features from AMS-LATEX.

This paper contains examples of various features from AMS-LATEX.

2 Enumeration of Hamiltonian paths in a graph

2 Enumeration of Hamiltonian paths in a graph

Letbe the adjacency matrix of graph. The corresponding Kirchhoff

Let bold A equals open paren a sub i j close paren be the adjacency matrix of graph G. The corresponding Kirchhoff

matrixis obtained fromby replacing ineach diagonal entry by the

matrix bold K equals open paren k sub i j close paren is obtained from bold A by replacing in negative bold A each diagonal entry by the

degree of its corresponding vertex; i.e., theth diagonal entry is identified with the

degree of its corresponding vertex; i.e., the ith diagonal entry is identified with the

degree of theth vertex. It is well known that

degree of the ith vertex. It is well known that

the determinant of bold K of open paren i divides i close paren equals the number of spanning trees of G comma i equals 1 comma period period period comma n

The hidden text is laid over the drawing line by line, so the outline a screen reader draws stays on the words it reads. Without JavaScript it is still in the page, in reading order.

To build a page with it, pass --a11y to the static-site builder (integrations/vanilla/build.ts). On a Hugo site, set reflowtexA11y = true under [params]; a single block can say a11y="true" or a11y="false". Every block on this site has it.

The inspector shows what a screen reader is given for any part of a page. Its Accessibility tab has the text of the selected box, with each formula as MathML or spoken, and a switch between the two. Under Overlays, Accessibility layer draws the orange boxes over the page itself, as in the picture above.