How to disable focus collision between MathJax 4 and combined generic readear?

26 views
Skip to first unread message

Konstantin Kirillov

unread,
Sep 3, 2026, 8:55:25 PMSep 3
to MathJax Users
Hello the community.

The basic concept is to run generic reader on highlight including MathJax expressions.

The code created in this project, landkey.net/z/bs/reader/r ,
works fine except one problem: it is hard for user to make selection without non-intentionally triggering MathJax tabbing mode, i.e. undesired MathJax-controlled focus on expression.

The question: what must be window.MathJax setting and/or JavaScript code to avoid undesired visual focus?

incorrect-and-correct-highlighting.png

What is achieved so far:

1. Run by one button click. User highlights page fragment and clicks the button. User does not have to make a quesswork how to start the run or where to reach the settings aka Chrome/BrowserMenu/Settings/More Tools/Reading Mode

Should work in generic browser of each major browsers and major OSes, Linux, Windows, Apple.

2. Web page html must allow content providers simple way (without coding JavaScript) to add MathJax voice replacement text near the expression dom-node, for case when MathJax is not capable to produce sensible voice output.

3. Basic math elements are honored: fractions, cross out, etc.

When you answer this question, even when making conceptual suggestion, it would be nice to have a link to working (even sandbox) example. Apparently, none of the following leading universities are able to achieve above requirements:

mit.edu/~wsshin/jemdoc+mathjaax.html
    Does not understand fraction and square root in expression
accessibility.psu.edu/math/mathml/
    Does not understand fraction and square root in expression
    Replay looses selection.
https://sitesuserguide.stanford.edu/build/working-text-editor/mathjax-displaying-math-notation-your-page
    Does not understand fraction and square root in expression
https://sitebuilder.princeton.edu/module/mathjax
    Incorrect voice, spaghetti highlight.
 https://pressbooks.cuny.edu/accessibilitytoolkit/chapter/stem/
    Highlighting fails, wrong fragment or an entire page is offered to listen.

Details and videos: https://landkey.net/z/bs/reader/review/

Thank you very much for your research.

Konstantin Kirillov

unread,
Sep 4, 2026, 6:59:21 PMSep 4
to MathJax Users
We found the hack on vendor's site:
  startup: {
      ready() {
          //this fixes focus collision with combined generic reader
          //https://github.com/mathjax/MathJax/issues/3491
          const { SpeechExplorer } = MathJax._.a11y.explorer.KeyExplorer;
          SpeechExplorer.prototype.AddEvents = function () { };        

We are not sure is there an official way for equivalent window.MathJax settings.
I cannot edit my original post, but probably this message will help to some one.
Reply all
Reply to author
Forward
0 new messages