This is meant to illustrate a few problems with MathJax3 when in explorer mode (i.e. when mathjax itself is generating text for screen readers):
it is difficult to escape from expressions once inside them
In firefox, the menus do not speak correctly: some items speak in full, some items only speak the first bit of the text label; menus speak correctly in chrome
pressing any key, even raw modifiers, can trigger the writing of text to the live region
Hacked solution
The fix for issue 2 (expression escape) is to assign a different role other than "application", and one which also switches screen reader modes like "application" does, then you can escape from it with the escape key. Here I assign role="tree" and aria-roledescription="math".
I have no idea why the menus are speaking incorrectly. The menu structure seems ok, and proper aria roles are used. There could be something being written to a live region after an item gains focus that is cutting of the speech from the announcement of the item's label when it gains focus, but I cannot verify this.
There do seem to be two live region elements, both with same attributes and marked aria-live="assertive" however which is a bit odd.
why two
"assertive" doesn't really work, and even if it did, it might in fact create the behavior I am seeing, i.e. cutting of cureently processing speech
from what I can see, "polite" and "assertive" seem to have identical behavior in NVDA; behavior may differ using different screen readers
Testing
be sure MathJax is generating speech; this also demonstrates issue 3 as well
with NVDA running, tab to an expression and press application key or shift+f10 or right click mouse
navigate to accessibility; note how NVDA sometimes cuts off menu labels
be sure that
active: checked
include hidden MathML: unchecked
collapsible math: unchecked
navigate the page with arrows in browse mode
you hear each expression's textual description read, along with the MathJax container's role name of "application"
navigate to any expression with tab when screen reader is in browse mode
now try to arrow around
your stuck inside the application role
you can navigate the math expression, but even pressing escape or the screen reader's "return to browse mode" key (NVDAKey+space or JawsKey+z) does not allow you to navigate the page
press the "substitute role" button
you should now be able to tab to an expression, hear NVDA switch into forms mode, navigate around the math as normal, and escape gets you out
here one press of escape gets me out, you you might have to press it twice
When `a != 0`, there are two solutions to `ax^2 + bx + c = 0`,
and they are
`x = (-b +- sqrt(b^2-4ac))/(2a)`.