Accessibility Components — MathJax 4.0 documentation (original) (raw)
Currently, there are five components designed specifically to support assistive technology.
To load one of these components, include the component name in theload array of the loader block of your MathJax configuration. For example:
to load the semantic-enrich extension.
The semantic-enrich, speech, and explorer components are part of all the combined components, so if you are using one of the those, you don’t need to load these assistive extensions yourself.
Note
In v3, the semantic-enrich extension included both the semantic enrichment and the speech generation features of MathJax. In v4, these functions are now accomplished by two distinct extensions, with the speech functionality being split off into a separatespeech extension.
If you are not using a combined component, by are using the ui/menucomponent, there are menu items that will cause these assistive extensions to be loaded dynamically, so you don’t need to load them explicitly in that case.
Note
The auto-collapse extension from version 2 has not yet been converted to the current version of MathJax, but will be in a future release.
Note
The assistive-menu extension from version 2 is now part of the standard contextual menu extension, so doesn’t have to be loaded separately.
a11y/semantic-enrich
The semantic-enrich component connects MathJax with the Speech Rule Engine, which allows MathJax to analyze the mathematics that it processes and add attributes that represent the semantic structure of the mathematics. The underlying MathML for each expression may be modified to better represent that structure, improving line-breaking and speech generation for the mathematics produced by MathJax.
See the Semantic-Enrich Extension Options section for information about configuring this component.
a11y/speech
The speech component connects MathJax with the Speech Rule Engine, which allows MathJax to generate speech strings for the mathematics that it processes. These can be attached to the output for use by screen readers, or for use with the a11y/explorer component described below.
The speech component uses web-workers to do the speech computations (which can be time-consuming) in a separate thread so that it doesn’t interfere with the responsiveness of your web pageor slow down the display of the typeset math in your page.
See the Speech Extension Options section for information about configuring this component.
a11y/explorer
The explorer component allows readers to explore a mathematical expression interactively. When an expression is focused by tabbing to it, the expression can be explored using the arrow keys, as described below. Clicking on a typeset expression will also enter the explorer at the character that is clicked.
Once the explorer is activated, the arrow keys move the reader through the expression: down moves to more detail by selecting the first subexpression of the selected expression, up moves to more complete expressions, while left and right move through the sub-expressions at the current level. See the Accessibility Features section for more details about using the expression explorer and its various features.
See the Explorer Extension Options section for information about configuring this component.
a11y/complexity
The complexity component computes a complexity measure for each element within an expression, and allows complex expressions to “collapse” to make them both shorter, and simpler to read. The collapsed portions can be expanded with a click of the mouse, or by keyboard actions when using the a11y/explorer extension described above.
See the Complexity Extension Options section for information about configuring this component.
a11y/assistive-mml
The assistive-mml component embeds visually hidden MathML alongside MathJax’s visual rendering while hiding the visual rendering from assistive technology (AT) such as screenreaders. This allows most MathML-enabled screenreaders to read out the underlying mathematics. It’s important to note that Presentation MathML in not expressive enough to voice the mathematics properly in all circumstances, which is why screenreaders have to rely on heuristics to analyze the MathML semantically. See theScreen Reader Support section for more details about screen reader support via the assistive-mml extension.
See the Assisitve-MML Extension Options section for information about configuring this component.
Note
In MathJax v2 and v3, the assistive-mml extension was loaded an enabled by default, but in v4, the explorer component has replaced it as the default assistive tool. The explorer can be disabled, however, and the assistive MathML re-enabled using the MathJax contexutal menu on any typeset expression, and page author’s can override the defaults in their MatghJax configuration objects, if they so desire.