text:
Expose MathML for accessibility

In order for screen readers and other assistive technology (AT) products to provide rich access to math content, they need to be able to access the raw math in a standard way. Providing alternate text is not sufficient, since although this does allow for better spoken math, it does not provide for braille, interactive exploration, etc. It seems MathML has become the dominant standard for exposing math content and MathJax uses MathML internally, so it'd make sense to expose it as MathML.
You can already use the toMathML extension to access MathML for a MathJax tree. The problem is that this requires JavaScript calls and an AT does not always have the ability to execute arbitrary JavaScript on the page. (For example, in Firefox, this isn't possible without a browser extension or Greasemonkey script.) There needs to be some way to obtain MathML from MathJax that does not require JavaScript calls.
One solution is to expose the MathML via an attribute; e.g. data-mathml. This is pretty inelegant and non-standard, but it does solve the problem. I've already implemented experimental support for this in NVDA's (not yet released) math support.
If exposing an attribute like this automatically is considered too expensive, we might be able to come up with a solution using an off-screen button or similar which exposes the attribute when activated. However, this is even less elegant and is more error prone, so I'd hope to avoid something like this if possible.
/cc @pkra

Both Wikipedia and Kahn Academy expose MathML. For the record, here's what they do:
Wikipedia
After setting the math display option to MathML with SVG or PNG fallback
FireFox
class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"
.mwe-math-mathml-inline {
    display: inline !important;
}

.mwe-math-mathml-a11y {
    clip: auto;
    overflow: visible;
    position: static;
    width: auto;
    height: auto;
    opacity: 1;
}

Chrome
.mwe-math-mathml-inline {
    display: inline !important;
}

.mwe-math-mathml-a11y {
    clip: rect(1px,1px,1px,1px);
    overflow: hidden;
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

Kahn Academy
The HTML-CSS ugliness that KaTeX generates has the aria-hidden attr on it. The MathML (class="katex-mathml") makes itself small so it isn't visible:
.katex .katex-mathml {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0px !important;
    border: 0px none !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden;
}

Thanks so much for those details, Neil. As you can see, this issue is in the milestone for the next release.
However, the OP proposes a different solution -- exposing MathML in a data-attribute so that AT can pick it up more easily. My impression is that, at this point, embedding MathML in the DOM is really only necessary for VoiceOver (and at least Wikipedia has a bug report for VoiceOver not working with its embedding). IIRC, all other math-enabled screenreaders can pick up MathJax's internal MathML already, so we're hoping that covering these two use cases will be a good iteration.
In any case, we'll bring our proposal up for discussion here and on the dev-list and reach out to other AT vendors.

I think the only AT that can pick up MJ's internal MathML is JAWS in IE
only. IE is the only browser that makes calling JS not too difficult. If
you embed the MathML in the DOM as opposed to "hiding" it or not exposing,
then I think AT will "just work". E.g, when Kahn Academy did it, NVDA
started working with it without any new work.
AFAIK, I've convinced the JAWS folks to look for  on a page because
trying to get it to work in Firefox and Chrome was a lot of work and
fragile. Having to do something special based on what technology is
rendering math isn't a great solution, so doing something that works
independent of MathJax running or not would be best as it removes the need
to do special casing.
The one place where maybe you need to know about the renderer is for sync
highlighting. But if AT could just tweak foreground and background of the
mathml in the DOM and the renderer would pick that up, that might be best.
That's a distant future though probably based on ShadowDOM. On the other
hand, the interface we worked out with TextHELP is probably a lot easier to
use for AT.
On Thu, Mar 19, 2015 at 11:22 AM, Peter Krautzberger <
notifications@github.com> wrote:

Thanks so much for those details, Neil. As you can see, this issue is in
the milestone for the next release.
However, the OP proposes a different solution -- exposing MathML in a
data-attribute so that AT can pick it up more easily. My impression is
that, at this point, embedding MathML in the DOM is really only necessary
for VoiceOver (and at least Wikipedia has a bug report for VoiceOver not
working with its embedding). IIRC, all other math-enabled screenreaders can
pick up MathJax's internal MathML already, so we're hoping that covering
these two use cases will be a good iteration.
In any case, we'll bring our proposal up for discussion here and on the
dev-list and reach out to other AT vendors.
—
Reply to this email directly or view it on GitHub
https://github.com/mathjax/MathJax/issues/938#issuecomment-83700362.

This is true.
In fact, I wrote a bookmarklet, MathInjector, to extract data-mathml and stuff it in a page with MathJax.
https://github.com/SinaBahram/MathInjector
I’d love to avoid ever having to use said bookmarklet e.g. AT does it automatically. There are some encoding issues, though (see comments in bookmarklet).
From: NSoiffer [mailto:notifications@github.com]
Sent: Thursday, March 19, 2015 2:44 PM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
I think the only AT that can pick up MJ's internal MathML is JAWS in IE
only. IE is the only browser that makes calling JS not too difficult. If
you embed the MathML in the DOM as opposed to "hiding" it or not exposing,
then I think AT will "just work". E.g, when Kahn Academy did it, NVDA
started working with it without any new work.
AFAIK, I've convinced the JAWS folks to look for  on a page because
trying to get it to work in Firefox and Chrome was a lot of work and
fragile. Having to do something special based on what technology is
rendering math isn't a great solution, so doing something that works
independent of MathJax running or not would be best as it removes the need
to do special casing.
The one place where maybe you need to know about the renderer is for sync
highlighting. But if AT could just tweak foreground and background of the
mathml in the DOM and the renderer would pick that up, that might be best.
That's a distant future though probably based on ShadowDOM. On the other
hand, the interface we worked out with TextHELP is probably a lot easier to
use for AT.
On Thu, Mar 19, 2015 at 11:22 AM, Peter Krautzberger <
notifications@github.com> wrote:

Thanks so much for those details, Neil. As you can see, this issue is in
the milestone for the next release.
However, the OP proposes a different solution -- exposing MathML in a
data-attribute so that AT can pick it up more easily. My impression is
that, at this point, embedding MathML in the DOM is really only necessary
for VoiceOver (and at least Wikipedia has a bug report for VoiceOver not
working with its embedding). IIRC, all other math-enabled screenreaders can
pick up MathJax's internal MathML already, so we're hoping that covering
these two use cases will be a good iteration.
In any case, we'll bring our proposal up for discussion here and on the
dev-list and reach out to other AT vendors.
—
Reply to this email directly or view it on GitHub
https://github.com/mathjax/MathJax/issues/938#issuecomment-83700362.

—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-83713289 .  https://github.com/notifications/beacon/ABui7eW1BaMbknSe2IohJqwCTinzKi66ks5n2xB9gaJpZM4CxCK5.gif

data-mathml is a massive hack. The only reason I suggested it was to avoid exposing real MathML in the DOM and having to visually hide it somehow, as well as having to hide the HTML-CSS rendering for accessibility. Real MathML would of course be much nicer, but see below.
There are two problems with these "hiding" solutions:

Because there's no explicit facility for having content visible to accessibility but hidden visually, different ATs may handle it differently.
Even if you find an approach that works for all ATs, ATs very possibly won't get the on-screen location of the math being visually displayed. For example, taking what Kahn Academy does, the AT will be told that the math has a width and height of 1 and the left and top coordinates might even be wrong too. This means, for example, that AT users won't be able to invoke the MathJax context menu. If the AT wants to display its own representation of the math for some reason, it won't know where to position it. I'm not sure about this one, but it may cause problems for magnifiers too, since they may not be able to get the location information they need.

I seem to recall hearing (but could well be wrong) that JAWS can only pick up MathML from MathJax if the input was MathML (and thus the MathML is hidden in the DOM); i.e. it won't work if the input was LaTeX. If that's the case, they're going to need a solution like this too to support other input formats.

I’m typing out loud here.
Regarding the first point, while it’s not an explicit thing, we’ve used off screen content for over two decades. I think there’s a nice combination of CSS that works across Jaws, NVDA, VoiceOver, within Firefox/IE/Chrome/Safari, etc.
I’ve not seen any AT not pick up on such things. At least, no AT that I’ve wanted to have access to it e.g. I obviously wouldn’t expect zoom text to pick up on it, and that’s a good thing, since it’s being hidden visually.
Regarding your second point, wouldn’t a reverse aria-describedby be a good idea here? we can put an aria-describedby on the image or other silly representation being chosen, and assign it’s value to the id of the off screen content. I only say silly because I think we’d all prefer that the MathML be the true representation, but unfortunately, given the lack of rigger in its visual presentation, certain mathematicians, I’m told, still prefer what they can achieve via LaTeX typesetting and other means.
There are accessible name calculations to think through, but if the accessible name of the mathematics is simply the output from running it through mathplayer, and or that can be assigned to it at runtime via an injection of aria-label onto said MathML, then the describedby pointing to it should pick that up and slap it onto the element being displayed visually. Since we’re doing an aria-describedby instead of an aria-labeledby, it won’t matter if MathPlayer isn’t installed, thus returning nothing from the aria-label of said MathML. E.g. graceful fallback to alt of the image.
Thoughts?
From: jcsteh [mailto:notifications@github.com]
Sent: Thursday, March 19, 2015 11:48 PM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
data-mathml is a massive hack. The only reason I suggested it was to avoid exposing real MathML in the DOM and having to visually hide it somehow, as well as having to hide the HTML-CSS rendering for accessibility. Real MathML would of course be much nicer, but see below.
There are two problems with these "hiding" solutions:

Because there's no explicit facility for having content visible to accessibility but hidden visually, different ATs may handle it differently.
Even if you find an approach that works for all ATs, ATs very possibly won't get the on-screen location of the math being visually displayed. For example, taking what Kahn Academy does, the AT will be told that the math has a width and height of 1 and the left and top coordinates might even be wrong too. This means, for example, that AT users won't be able to invoke the MathJax context menu. If the AT wants to display its own representation of the math for some reason, it won't know where to position it. I'm not sure about this one, but it may cause problems for magnifiers too, since they may not be able to get the location information they need.

I seem to recall hearing (but could well be wrong) that JAWS can only pick up MathML from MathJax if the input was MathML (and thus the MathML is hidden in the DOM); i.e. it won't work if the input was LaTeX. If that's the case, they're going to need a solution like this too to support other input formats.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-83883235 .  https://github.com/notifications/beacon/ABui7YbnArl9vIsQ7WA4CrUm4eUKjEjVks5n24_rgaJpZM4CxCK5.gif

Thanks for all your comments -- we really appreciate it.
Re @NSoiffer

I think the only AT that can pick up MJ's internal MathML is JAWS in IE only.

IIRC, ChromeVox, Texthelp and GH all use MathJax directly in various settings (web and apps), including synchronized highlighting.

If you embed the MathML in the DOM as opposed to "hiding" it or not exposing, then I think AT will "just work".

From what I've heard, all hidden embeddings so far have had problems, so I'm a bit sceptical (also when ignoring the performance penalty for this).
Thanks also @jcsteh and @sinabahram for those valuable points. @sinabahram, aria-describedby is on our todo list to investigate; do you happen to know if there's a way to specify multiple alternatives? We can imagine a situation where we would provide MathML, TeX and speech text possibly more author-provided formats. (Also, we would want to expose the MathML tree structure in the output.)
The larger problem is that native brower support is not on the horizon and web components are also not very close to being usable in production (neither natively nor with polyfills, which IIUC also cause a11y problems).
So we think it would be a good idea to develop a practical and generic way of exposing the underlying data (i.e., MathML but potentially other source) in the rendering. In my eyes, this would ideally be something we could publish as a note of the MathWG.
The goal would be that all MathML renderers and AT solutions could adopt it, independently of any one rendering solution or any one AT math-component. It could even help accesibility solutions for other formats move forward (e.g., ChemML).
This does not seem unattainable to me.
Perhaps it makes sense to set up a call with interested folks as soon as possible. For those interested, drop me an email at peter.krautzberger@mathjax.org.

@sinabahram: While you may be correct about off-screen content in most cases, @pkra noted that there's a bug against Wikipedia regarding VoiceOver not detecting the MathML. Even if this is somehow incorrect, the point is that this is highly unreliable/error prone.
IMO, aria-describedby isn't an option here for several reasons:

An AT would still need to have explicit support to hunt for the node referenced by aria-describedby and handle it as math. It'd also need to map the on-screen location to the describedby node. If we're going to do that, we may as well just do data-mathml, which is less convoluted (if still hacky).
Even if an AT did this, the math would appear twice to the user, since the description (as referenced by aria-describedby) would still be present in its original place as well. (We don't "move" the description from its original place to the place where it is referenced for various reasons.)
Browsers/existing ATs would try to calculate text from the math referenced by aria-describedby, resulting in a very confusing description.
The output from MathPlayer can't simply be made the accessible name. It contains stuff other than text (pauses, etc.), which accessible name can't handle.

Basically, using aria-describedby is still a nasty hack, is more convoluted and doesn't solve any problems better than data-mathml. I'm very much opposed to this solution. :)

Great points, and thanks for making them.
So, it seems like data-mathml is the way to go, barring any other suggestions?
Should we agree on a standard encoding?
From: jcsteh [mailto:notifications@github.com]
Sent: Friday, March 20, 2015 6:57 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
@sinabahram https://github.com/sinabahram : While you may be correct about off-screen content in most cases, @pkra https://github.com/pkra  noted that there's a bug against Wikipedia regarding VoiceOver not detecting the MathML. Even if this is somehow incorrect, the point is that this is highly unreliable/error prone.
IMO, aria-describedby isn't an option here for several reasons:

An AT would still need to have explicit support to hunt for the node referenced by aria-describedby and handle it as math. It'd also need to map the on-screen location to the describedby node. If we're going to do that, we may as well just do data-mathml, which is less convoluted (if still hacky).
Even if an AT did this, the math would appear twice to the user, since the description (as referenced by aria-describedby) would still be present in its original place as well. (We don't "move" the description from its original place to the place where it is referenced for various reasons.)
Browsers/existing ATs would try to calculate text from the math referenced by aria-describedby, resulting in a very confusing description.
The output from MathPlayer can't simply be made the accessible name. It contains stuff other than text (pauses, etc.), which accessible name can't handle.

Basically, using aria-describedby is still a nasty hack, is more convoluted and doesn't solve any problems better than data-mathml. I'm very much opposed to this solution. :)
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-83985719 .  https://github.com/notifications/beacon/ABui7c0dqJJlznQx5qm8fsTza5lrwyyrks5n2_SQgaJpZM4CxCK5.gif

Here are some notes coming out of our last developer meeting. I'll send out an email to schedule a call. Not sure how to reconcile the time zones involved but we'll sort it out.
Some background.

MathJax attaches ids to all elements of its output (for various reasons)

if the source includes an id (e.g., a MathML element), this id will be re-used for the corresponding element in the output.

The new CommonHTML output can be highlighted directly, a highlighting extension for the HTML-CSS output is in the works.

Proposal(s)

Structure of the exposed MathML

The exposed MathML will correspond to the internal MathML used to generate the output (not necessarily identical to the source)
Each MathML element will carry an id ( if preferred: a data-* attribute) corresponding to the id of the element corresponding to it in the output.
This allows AT to easily link the MathML structure with the output structure.

Options for embedding

Add a data-mathml attribute with serialization of the MathML (with ids)

mapping to output
AT will serialize anyway (true?)
simpler implementation, better performance

Add hidden MathML directly (without ids)

MathML is in the DOM
accessible to DOM exploration
no mapping to rendering
rendering needs to be hidden (or aria-describedby used but as discussed this has other problems)
could be made to work with VoicOver

Add hidden <object> element containing the MathML (with ids).

MathML in the DOM
accessible to DOM exploration
retaining a direct mapping via the ids (since <object> elements are a separate document there is no conflict).

The team is leaning towards (i.) but we want to implement what works best for AT (or more pricesly, its users).

Thanks for the great summary.
Regarding serialisation, NVDA does serialise, but it's possible that
VoiceOver doesn't serialise into MathML, as it obtains math via the
accessibility hierarchy. That may preclude data-mathml as an option if
we want VoiceOver support. I guess someone will need to discuss this
with Apple accessibility.
It's worth noting that visually hiding the MathML and hiding the
HTML-CSS for accessibility would certainly work for both NVDA and
VoiceOver right now. However, it does have the disadvantages I noted
regarding associating to the visual location, etc. Primarily, this means
no access to the MathJax context menu and no ability to display an
overlay over the math. The former in particular is pretty serious.

Thanks, @jcsteh.

[...] That may preclude data-mathml as an option if we want VoiceOver support.

Right, we are not assuming data-mathml would work with VoiceOver; a specialized solution would probably be necessary (just like it is for MathPlayer 3).

I guess someone will need to discuss this with Apple accessibility.

We don't have any contacts there so we'd appreciate any help.

It's worth noting that visually hiding the MathML and hiding the HTML-CSS for accessibility would certainly work for both NVDA and VoiceOver right now.

Right. We're open to any solution that helps AT users the most.

I came across this Paciello Group post that includes tests on browsers and AT (updated Nov 2013). It recommends the off screen technique:

Use an off screen technique to remove content from visible display, but still available to screen reader users:
Example code:
.offscreen
{position:absolute;
left:-10000px;
top:auto;
width:1px;
height:1px;
overflow:hidden;}

<div class="offscreen">This text is hidden.

They said this recommendation comes from a WebAIM page on hiding in CSS

Absolutely positioning content off-screen

Using CSS to move hidden elements to a position off-screen is generally accepted as the most useful and accessible method of hiding content visually.

It seems to me we should go with the established techniques and then try to mitigate the menu issue that James raised if it really is an issue (the menu is currently not accessible AFAIK). Mitigating the overlay issue (if it is one) could potentially be done by having whomever cared look at the next element (of a certain kind?) as that would be the display.
Of course, none of this is needed with Shadow DOM (I think)...

Please see this page for a few enhancements to that technique:
http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
From: NSoiffer [mailto:notifications@github.com]
Sent: Thursday, April 16, 2015 2:39 PM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
I came across this Paciello Group post http://www.paciellogroup.com/blog/2012/05/html5-accessibility-chops-hidden-and-aria-hidden/  that includes tests on browsers and AT (updated Nov 2013). It recommends the off screen technique:
Use an off screen technique to remove content from visible display, but still available to screen reader users:
Example code:
.offscreen
{position:absolute;
left:-10000px;
top:auto;
width:1px;
height:1px;
overflow:hidden;}
This text is hidden.
They said this recommendation comes from a WebAIM page on hiding in CSS http://webaim.org/techniques/css/invisiblecontent/#techniques
Absolutely positioning content off-screen
Using CSS to move hidden elements to a position off-screen is generally accepted as the most useful and accessible method of hiding content visually.
It seems to me we should go with the established techniques and then try to mitigate the menu issue that James raised if it really is an issue (the menu is currently not accessible AFAIK). Mitigating the overlay issue (if it is one) could potentially be done by having whomever cared look at the next element (of a certain kind?) as that would be the display.
Of course, none of this is needed with Shadow DOM (I think)...
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-93810919 .  https://github.com/notifications/beacon/ABui7eqe03GgfB12k6ockUN23ca_dHQIks5n__lcgaJpZM4CxCK5.gif

Hiding MathML in an attribute would make touch exploration of math elements impossible with VoiceOver on iOS.... ditto for moving it off screen
The best option is to use MathML natively. Then it's there visually, it can be explored by touch and the native rendering semantics that are deployed when rendering in web engines is able to be leveraged by accessibility code to output relevant information.

I agree with Neil and Chris here, putting the <math> tag directly in the source code and hiding it (like what KaTeX and Wikipedia do or, alternatively, using offscreen technique) is the best option: then any accessibility tool can access the MathML source "naturally", without having to introduce some hacks to make it work specifically with MathJax.
The data-mathml option sounds horrible to me, so I definitely hope you won't go that way since it won't work with native accessible tree APIs as used by WebKit+VoiceOver and that is intended to be implemented in Gecko/VoiceOver, Gecko/Orca and VoiceOver/Orca (and any future combinations of web engine / AT that implements this kind of API).
If I understand correctly the <object> option, it is putting the MathML in a separate document, embedded as an object. My guess is that it will work better than the data-mathml option, but will still not be "natural" since the AT will will have to tell the user that he is entering/exiting an <object>. @fleizach probably knows better what will happen here, and any potential problems.
Someone commented that Wikipedia's CSS hidden technique has issues (there is indeed a bug entry about touch screen). As indicated by Chris, this obviously breaks visual rendering and the related a11y features (highlighting, zooming, exploring by touch...). But all the techniques discussed in this thread (including putting MathML in the shadow DOM) have this defect anyway (unless of course MathJax tries to do the job of ATs and reimplements features that should really be native). At least having MathML in the DOM, even hidden, will improve a11y support for non-visual output.
Finally, regarding the comments about greasemonkey scripts and extensions trying to extract data-mathml, this sounds an additional workaround over the data-mathml hack. I recommend to people to use extensions to automatically switch to native MathML instead, which will be much more efficient:
https://addons.mozilla.org/en-US/firefox/addon/mathjax-native-mathml/
https://github.com/fred-wang/mathjax-native-mathml-safari
https://github.com/fred-wang/mathjax-native-mathml-greasemonkey
As a bonus, this will also make visual a11y features work.

I'll stress this again: visually hiding native MathML means an AT can't
get the location information for the MathML. Among other things, that
means no MathJax context menu access. As has already been pointed out,
it also means no touch screen access. There are hacks to work around
this (such as ATs using the role="math" parent for location information
of the entire expression), but these are still AT specific hacks. The
point is that this utopian idea that visually hiding MathML is nice and
clean and doesn't require AT hacks is completely false. Until we're
dealing only with native browser rendering of MathML, this is going to
be hacky.

@jcsteh What do you mean by "hiding" and which comment are you referring by "hiding MathML is nice and clean and doesn't require AT hacks"? AFAIK, people working on MathML a11y confirmed that the CSS clipping hack used by Wikipedia and Kahn Academy works for non-visual a11y features (in particular Neil confirmed that it works with NVDA+MathPlayer). Are you suggesting to introduce a different hack for MathJax, which would move even farther away from native MathML? And what would be the rationale for that? (And as a separate question: which feature of the MathJax menu are you willing to expose?)

@fred-wang: You stated:

then any accessibility tool can access the MathML source "naturally", without having to introduce some hacks to make it work specifically with MathJax
That's true if you don't care about being able to locate the math on screen and you don't care about doing anything visual. My point is that if you do care about either of these things, you will need hacks, so visually hidden MathML actually doesn't eliminate the need for hacks at all.

As for the context menu, we don't plan to expose a specific feature, but there are certainly useful options in that menu. If we take the visually hidden MathML approach, there will be no way for a screen reader user to right click the math to access the MathJax context menu, since the MathML that the screen reader sees is off-screen and therefore you can't route the mouse to it. Note that data-mathml does not have this problem (though it's certainly pure evil), since the location information for the root MathJax node will be correct.
Visually hidden MathML seems to be the general consensus and that's fine. However, it will definitely prevent context menu access for screen reader users unless we want to implement another kind of horrible hack, and since you don't like data-mathml because it's a horrible hack, you're unlikely to like the kind of horrible hack needed here either.

That's true if you don't care about being able to locate the math on screen and you don't care about doing anything visual. My point is that if you do care about either of these things, you will need hacks, so visually hidden MathML actually doesn't eliminate the need for hacks at all.

OK, thanks for clarifying. I thought my comment was clear that I meant making non-visual things cross-compatible and that I'm suggesting the add-ons forcing native MathML for more advanced features. As I understand the choice of data-mathml will bring more visual things for NVDA (modulo additional adjustments) but will still not be useful at all (even for non-visual things) for other tools like VoiceOver or Orca. Personally, I'd prefer that the default is to have a minimal cross-compatible accessibility than more hacks for one specific AT.

As for the context menu, we don't plan to expose a specific feature, but there are certainly useful options in that menu.

I think the most important for an AT is to be able to read the mathematical equation, while the features in the MathJax menu are of less importance. Using the extension I mention, you can force native MathML while also keeping the MathJax menu. Alternatively, other add-ons like https://addons.mozilla.org/en-US/firefox/addon/mathml-copy/, https://addons.mozilla.org/en-US/firefox/addon/mathml-zoom/ or https://addons.mozilla.org/en-US/firefox/addon/mathml-font-settings/ expose equivalent features via the native Firefox contextual menu (which should be accessible!).

As I understand the choice of data-mathml will bring more visual things for NVDA (modulo additional adjustments) but will still not be useful at all (even for non-visual things) for other tools like VoiceOver or Orca. Personally, I'd prefer that the default is to have a minimal cross-compatible accessibility than more hacks for one specific AT.
In principle, I agree. However, it's worth noting that when I proposed this, I was aiming for open discussion and consensus with maximum benefit for all ATs, not just trying to get an NVDA specific hack into MathJax. I had no idea whether Orca and VoiceOver would refuse data-mathml, despite the potential advantages. Now that this is very much clear, of course it makes sense to just go with native, visually hidden MathML and people will have to accept that screen reader users will never be able to access the MathJax context menu or do other visual stuff. At the end of the day, even this solution is a nasty hack--any visual hiding like this is a nasty hack--but so is non-native MathML rendering. :)

people will have to accept that screen reader users will never be able to access the MathJax context menu or do other visual stuff

Well rather than 'never' I'd say until MathJax uses native MathML as the default or until these people install an addon to force native MathML... In my opinion it's not at all a bad idea to focus on a standard approach (MathML in the DOM) for ATs, math content generators, and Web rendering engines and teach people how to use it.
A separate note on the MathJax contextual menu: as I remember MathJax makes this menu accessible by attaching event on each math equation despite the fact that the menu is not equation-specific (please correct if I'm wrong). If instead the menu was made globally available and not available for each math expression, we won't have this "hiding" issue.

please correct if I'm wrong

correcting myself: at least the copy & paste feature is equation specific.

RE @fleizach
Thanks for your comment, Chris! We really appreciate getting feedback from an Apple/VoiceOver point of view.

Hiding MathML in an attribute would make touch exploration of math elements impossible with VoiceOver on iOS.... ditto for moving it off screen

Yes, we are (painfully) aware of this.

The best option is to use MathML. Then it's there visually, it can be explored by touch and the native rendering semantics that are deployed when rendering in web engines is able to be leveraged by accessibility code to output relevant information.

I think everyone agrees that native MathML would be the ideal solution.
The trouble is that it's difficult to argue it would be "the best option" right now. The main reason is that

Then it's there visually,

is not actually the case.
IE and Chrome have no MathML support planned and WebKit's MathML support is not ready for professional production. (If there's interest from Apple, I'd be happy to put together a list of organizations that feel that way, e.g. large and small publishers in K-12 and/or research-level STEM, also sites like Wikipedia, StackExchange etc). Unfortunately, there is also no significant MathML development on WebKit right now that would indicate improvements might eventually arrive.
We're not judging. It's just the reason why we want (but really: we need) to figure out alternative means of making our rendering (and hopefully that from other polyfills) as accessible as possible. We would greatly appreciate any additional input.
For example, how should an SVG diagram be made accessible to a (VoiceOver) user? How should an author of complex typography (such as these examples) provide information for (VoiceOver) users?
Again, we really appreciate your comments, Chris. We hope, thanks to all the feedback we received here and elsewhere, we can provide a decent compromise for those users who need both a visually correct and AT friendly rendering.

RE @jcsteh, @fred-wang thanks for the additional comments.

I guess this is obvious, but it has not been mention explicitly: a CSS hack to hide the MathML can be reverted via a user stylesheet (which can be applied or unapplied at any moment). In practice, this is much easier to perform, more reliable, less subject to bugs and more efficient than a script synchronizing with the page's javascript and extracting the MathML for each formula.

On May 1, 2015, at 8:12 AM, Peter Krautzberger notifications@github.com wrote:
RE @fleizach https://github.com/fleizach
Thanks for your comment, Chris! We really appreciate getting feedback from an Apple/VoiceOver point of view.
Hiding MathML in an attribute would make touch exploration of math elements impossible with VoiceOver on iOS.... ditto for moving it off screen
Yes, we are (painfully) aware of this.
The best option is to use MathML. Then it's there visually, it can be explored by touch and the native rendering semantics that are deployed when rendering in web engines is able to be leveraged by accessibility code to output relevant information.
I think everyone agrees that native MathML would be the ideal solution.
The trouble is that it's difficult to argue it would be "the best option" right now. The main reason is that
Then it's there visually,
is not actually the case.
IE and Chrome have no MathML support planned

This is a real shame in my opinion. It is a direct affront to users who need AT to read math equations.

and WebKit's MathML support is not ready for professional production. (If there's interest from Apple, I'd be happy to put together a list of organizations that feel that way, e.g. large and small publishers in K-12 and/or research-level STEM, also sites like Wikipedia, StackExchange etc). Unfortunately, there is also no significant MathML development on WebKit right now that would indicate improvements might eventually arrive.

I would like a list of bugs or issues that would bring MathML into production level quality so we can start working on those.

We're not judging. It's just the reason why we want (but really: we need) to figure out alternative means of making our rendering (and hopefully that from other polyfills) as accessible as possible. We would greatly appreciate any additional input.
For example, how should an SVG diagram be made accessible to a (VoiceOver) user? How should an author of complex typography (such as these examples http://www.smashingmagazine.com/2013/02/26/creating-visual-hierarchies-typography/) provide information for (VoiceOver) users?

SVG elements can be made accessible with aria-label. In general this should work, but there are probably caveats in there.
As to the overall solution of exposing math content but hiding it -- I also don’t have any novel ideas.
<math display:none aria-hidden=false>

could provide some benefit.

It would be nice to be able to have some way to render the MathML if a screen reader is running. I know no spec allows for this at the time being.
So I would probably rather see the content be clipped, but still rendered somewhere so that positioning information would be available
Thanks

Again, we really appreciate your comments, Chris. We hope, thanks to all the feedback we received here and elsewhere, we can provide a decent compromise for those users who need both a visually correct and AT friendly rendering.
RE @jcsteh https://github.com/jcsteh, @fred-wang https://github.com/fred-wang thanks for the additional comments.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-98153589.

This won’t work:

I believe you obviously mean:

But, that’s not why it won’t work. it won’t work because display:none removes from the screen reader as well, regardless of aria-hidden.
President, Prime Access Consulting, Inc.
Twitter: @SinaBahram
Company Website: http://www.pac.bz
Personal Website: http://www.sinabahram.com
Blog: http://blog.sinabahram.com
From: fleizach [mailto:notifications@github.com]
Sent: Monday, May 04, 2015 7:25 PM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)

On May 1, 2015, at 8:12 AM, Peter Krautzberger notifications@github.com wrote:
RE @fleizach https://github.com/fleizach
Thanks for your comment, Chris! We really appreciate getting feedback from an Apple/VoiceOver point of view.
Hiding MathML in an attribute would make touch exploration of math elements impossible with VoiceOver on iOS.... ditto for moving it off screen
Yes, we are (painfully) aware of this.
The best option is to use MathML. Then it's there visually, it can be explored by touch and the native rendering semantics that are deployed when rendering in web engines is able to be leveraged by accessibility code to output relevant information.
I think everyone agrees that native MathML would be the ideal solution.
The trouble is that it's difficult to argue it would be "the best option" right now. The main reason is that
Then it's there visually,
is not actually the case.
IE and Chrome have no MathML support planned

This is a real shame in my opinion. It is a direct affront to users who need AT to read math equations.

and WebKit's MathML support is not ready for professional production. (If there's interest from Apple, I'd be happy to put together a list of organizations that feel that way, e.g. large and small publishers in K-12 and/or research-level STEM, also sites like Wikipedia, StackExchange etc). Unfortunately, there is also no significant MathML development on WebKit right now that would indicate improvements might eventually arrive.

I would like a list of bugs or issues that would bring MathML into production level quality so we can start working on those.

We're not judging. It's just the reason why we want (but really: we need) to figure out alternative means of making our rendering (and hopefully that from other polyfills) as accessible as possible. We would greatly appreciate any additional input.
For example, how should an SVG diagram be made accessible to a (VoiceOver) user? How should an author of complex typography (such as these examples http://www.smashingmagazine.com/2013/02/26/creating-visual-hierarchies-typography/) provide information for (VoiceOver) users?

SVG elements can be made accessible with aria-label. In general this should work, but there are probably caveats in there.
As to the overall solution of exposing math content but hiding it -- I also don’t have any novel ideas.

could provide some benefit.
It would be nice to be able to have some way to render the MathML if a screen reader is running. I know no spec allows for this at the time being.
So I would probably rather see the content be clipped, but still rendered somewhere so that positioning information would be available
Thanks

Again, we really appreciate your comments, Chris. We hope, thanks to all the feedback we received here and elsewhere, we can provide a decent compromise for those users who need both a visually correct and AT friendly rendering.
RE @jcsteh https://github.com/jcsteh, @fred-wang https://github.com/fred-wang thanks for the additional comments.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-98153589.

—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-98883568 .  https://github.com/notifications/beacon/ABui7fJLyKVhIgOISfUt4vYjo1sEVuOCks5oF_c5gaJpZM4CxCK5.gif

Well, there is talk of having aria-hidden="false" override CSS display:
none, but I don't think that's in a final spec yet. Certainly, it's not
implemented for Windows browsers yet.

FYI this behavior is implemented in WebKit
Sent from my iPhone

On 4 Mē 2015, at 6:51 PM, James Teh notifications@github.com wrote:
Well, there is talk of having aria-hidden="false" override CSS display:
none, but I don't think that's in a final spec yet. Certainly, it's not
implemented for Windows browsers yet.
—
Reply to this email directly or view it on GitHub.

If it's not displayed, then something else is likely taking up the space
into which it would be displayed. Even if the specs were changed, why would
this be better for location-based events than if it were displayed
offscreen?
Neil
On Mon, May 4, 2015 at 6:52 PM, fleizach notifications@github.com wrote:

FYI this behavior is implemented in WebKit
Sent from my iPhone

On 4 Mē 2015, at 6:51 PM, James Teh notifications@github.com wrote:
Well, there is talk of having aria-hidden="false" override CSS display:
none, but I don't think that's in a final spec yet. Certainly, it's not
implemented for Windows browsers yet.
—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub
https://github.com/mathjax/MathJax/issues/938#issuecomment-98903392.

It wouldn't be much better, hence my advocacy for just using mathml as it's intended to be.
Sent from my iPhone

On 4 Mē 2015, at 9:15 PM, NSoiffer notifications@github.com wrote:
If it's not displayed, then something else is likely taking up the space
into which it would be displayed. Even if the specs were changed, why would
this be better for location-based events than if it were displayed
offscreen?
Neil
On Mon, May 4, 2015 at 6:52 PM, fleizach notifications@github.com wrote:

FYI this behavior is implemented in WebKit
Sent from my iPhone

On 4 Mē 2015, at 6:51 PM, James Teh notifications@github.com wrote:
Well, there is talk of having aria-hidden="false" override CSS display:
none, but I don't think that's in a final spec yet. Certainly, it's not
implemented for Windows browsers yet.
—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub
https://github.com/mathjax/MathJax/issues/938#issuecomment-98903392.

—
Reply to this email directly or view it on GitHub.

Let me put it this way. This behavior is non-standard for over 80 to 90% of blind/low vision web users.
From: fleizach [mailto:notifications@github.com]
Sent: Monday, May 04, 2015 9:53 PM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
FYI this behavior is implemented in WebKit
Sent from my iPhone

On 4 Mē 2015, at 6:51 PM, James Teh notifications@github.com wrote:
Well, there is talk of having aria-hidden="false" override CSS display:
none, but I don't think that's in a final spec yet. Certainly, it's not
implemented for Windows browsers yet.
—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-98903392 .  https://github.com/notifications/beacon/ABui7S9ZfXq_5zVDgCcY56ZvwVTbZ1l4ks5oGBnvgaJpZM4CxCK5.gif

Thanks for the recent comments.
@fleizach since the display:none with aria-hidden=false only works on Safari, it's not an option for us since we our goal is browser-independent output.
We had a call with a number of AT vendors and accessibility experts a few weeks ago to talk about possible solutions. This didn't get us to any specific solution but certainly a few steps closer -- thanks to everyone who took the time!
Right now we are considering the following.

an extension that generates the internal MathML, embeds it hidden in the DOM
as well as in a data-attribute (with matching ids etc).

We expect a performance hit for this extension. This might make it prohibitive (at least for now) to load this extension by default. For that case and for a first iteration we are considering:

A user opt-in via the MathJax menu to load that extension even when the page author has not configured MathJax to load it. (Please note that work on this issue will happen in sync with #939 and other related issues).
A discoverable opt-in for keyboard users. For example, via an invisible button that is revealed upon navigating to the first equation or using other visually hidden means to provide the information.
Any other clever way of opting in, in particular we're still looking for an idea that would help sighted AT users. We'd appreciate any input on this.
Finally, we will also consider loading the extension as a "post-processor" (i.e., after MathJax's visual rendering is done).
These opt-ins would work on a per-domain basis using the usual MathJax cookie to store preferences.

Thanks again for all your input and any further feedback you might have.

Would it be possible for an AT to set a flag in the MathJax cookie so that the AT's users wouldn't have to opt-in for accessibility?

This is not a good practice from an accessibility point of view. There’s no way we can convince all AT to do it, and while it’s appealing from a development standpoint, it’s not good to force users to opt into basic access.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 9:06 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Would it be possible for an AT to set a flag in the MathJax cookie so that the AT's users wouldn't have to opt-in for accessibility?
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101656609 .  https://github.com/notifications/beacon/ABui7cHmALU_Y966Vhv1kkoNU8wHFTHbks5oI0OlgaJpZM4CxCK5.gif

I don’t hold with your assertion that “this is not a good practice from an accessibility point of view.” We don’t need to convince all AT to do it. But those who want to make it easier for their users should have the option. And an AT user by definition wants basic access. And like all users of any type of software, they want it to be as hassle free as possible.
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:02 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
This is not a good practice from an accessibility point of view. There’s no way we can convince all AT to do it, and while it’s appealing from a development standpoint, it’s not good to force users to opt into basic access.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 9:06 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Would it be possible for an AT to set a flag in the MathJax cookie so that the AT's users wouldn't have to opt-in for accessibility?
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101656609 . https://github.com/notifications/beacon/ABui7cHmALU_Y966Vhv1kkoNU8wHFTHbks5oI0OlgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-101704751.

The last thing we need is to have an AT user jump through more hoops. We don’t ask users if they wat the alt text on an image or if they would like certain accessibility features turned on in a page. I really do understand the simplistic appeal to ask users, but I view it as an utter last resort. We need the math to “just work”, not have someone turn something on by finding it, and then having to reload a page and then having that setting lost in incognito/privacy mode, etc.
I strongly disagree with this approach.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:22 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
I don’t hold with your assertion that “this is not a good practice from an accessibility point of view.” We don’t need to convince all AT to do it. But those who want to make it easier for their users should have the option. And an AT user by definition wants basic access. And like all users of any type of software, they want it to be as hassle free as possible.
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:02 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
This is not a good practice from an accessibility point of view. There’s no way we can convince all AT to do it, and while it’s appealing from a development standpoint, it’s not good to force users to opt into basic access.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 9:06 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Would it be possible for an AT to set a flag in the MathJax cookie so that the AT's users wouldn't have to opt-in for accessibility?
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101656609 . https://github.com/notifications/beacon/ABui7cHmALU_Y966Vhv1kkoNU8wHFTHbks5oI0OlgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-101704751.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101713672 .  https://github.com/notifications/beacon/ABui7eKF-mIC9WBg4rrfrBS-Pn7WXZhyks5oI2OEgaJpZM4CxCK5.gif

Sina, it’s possible you misunderstood my comment, assuming that you were indeed responding to my comment. I believe we are in agreement. I, too, want MathJax to “just work” with ATs. However, I think Peter ‘s objection to having MathML embedded all the time is that there is a performance penalty for the vast majority of users who don’t use AT with MathJax. Therefore, to try to come to some solution that would accommodate both sets of users, ATs and non-ATs alike, I suggested using the MathJax cookie as a way for the AT itself to do the work programmatically that the user would have to do manually.
Thanks,
RG
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:28 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
The last thing we need is to have an AT user jump through more hoops. We don’t ask users if they wat the alt text on an image or if they would like certain accessibility features turned on in a page. I really do understand the simplistic appeal to ask users, but I view it as an utter last resort. We need the math to “just work”, not have someone turn something on by finding it, and then having to reload a page and then having that setting lost in incognito/privacy mode, etc.
I strongly disagree with this approach.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:22 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
I don’t hold with your assertion that “this is not a good practice from an accessibility point of view.” We don’t need to convince all AT to do it. But those who want to make it easier for their users should have the option. And an AT user by definition wants basic access. And like all users of any type of software, they want it to be as hassle free as possible.
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:02 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
This is not a good practice from an accessibility point of view. There’s no way we can convince all AT to do it, and while it’s appealing from a development standpoint, it’s not good to force users to opt into basic access.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 9:06 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Would it be possible for an AT to set a flag in the MathJax cookie so that the AT's users wouldn't have to opt-in for accessibility?
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101656609 . https://github.com/notifications/beacon/ABui7cHmALU_Y966Vhv1kkoNU8wHFTHbks5oI0OlgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-101704751.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101713672 . https://github.com/notifications/beacon/ABui7eKF-mIC9WBg4rrfrBS-Pn7WXZhyks5oI2OEgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-101715310.

First, sorry for lack of threading. I’m using github’s email response mechanism, and I don’t have any feedback about whether it groups or threads messages correctly. I am responding to the cookie message on this thread. Sorry for any confusion on that.
I hear you on the AT actuating the right values within the cookie, but there are many instances where I’m not sure that’s going to work. I feel that we still have a strong requirement for the user to indicate necessity of MathML when the AT doesn’t work or in a variety of instances where that value is lost. There is also a significant privacy issue here. what we’re proposing is that folks have to indicate the status of their disability or at least that they are using AT. And, for most users, they won’t even know this is going on. to me, that’s a pretty big deal, not because I care, personally, if a website knows that I’m blind, but because I know many people will and frankly, have perfect reason for doing so.
RE performance hit: Am I correct in my understanding that rendering the MathML off screen also incurs this performance penalty? If it doesn’t, Neil was telling me that there’s an example, and we need to find the URL of this example, that as long as the div is on screen, then the math can be positioned off screen, and then the user can still touch the visual math image but hear the MathML. We should verify that to at least address the off screen concerns from earlier.
My basic intended use case is that when a kid in school has a screen reader on and goes to a Wikipedia or other page containing math, it just works for them. I still think this is possible.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:38 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Sina, it’s possible you misunderstood my comment, assuming that you were indeed responding to my comment. I believe we are in agreement. I, too, want MathJax to “just work” with ATs. However, I think Peter ‘s objection to having MathML embedded all the time is that there is a performance penalty for the vast majority of users who don’t use AT with MathJax. Therefore, to try to come to some solution that would accommodate both sets of users, ATs and non-ATs alike, I suggested using the MathJax cookie as a way for the AT itself to do the work programmatically that the user would have to do manually.
Thanks,
RG
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:28 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
The last thing we need is to have an AT user jump through more hoops. We don’t ask users if they wat the alt text on an image or if they would like certain accessibility features turned on in a page. I really do understand the simplistic appeal to ask users, but I view it as an utter last resort. We need the math to “just work”, not have someone turn something on by finding it, and then having to reload a page and then having that setting lost in incognito/privacy mode, etc.
I strongly disagree with this approach.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:22 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
I don’t hold with your assertion that “this is not a good practice from an accessibility point of view.” We don’t need to convince all AT to do it. But those who want to make it easier for their users should have the option. And an AT user by definition wants basic access. And like all users of any type of software, they want it to be as hassle free as possible.
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:02 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
This is not a good practice from an accessibility point of view. There’s no way we can convince all AT to do it, and while it’s appealing from a development standpoint, it’s not good to force users to opt into basic access.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 9:06 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Would it be possible for an AT to set a flag in the MathJax cookie so that the AT's users wouldn't have to opt-in for accessibility?
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101656609 . https://github.com/notifications/beacon/ABui7cHmALU_Y966Vhv1kkoNU8wHFTHbks5oI0OlgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-101704751.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101713672 . https://github.com/notifications/beacon/ABui7eKF-mIC9WBg4rrfrBS-Pn7WXZhyks5oI2OEgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-101715310.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101718628 .  https://github.com/notifications/beacon/ABui7RJ3xEm2c45nYRDSZRLPQETopAjmks5oI2dHgaJpZM4CxCK5.gif

@Sina “My basic intended use case is that when a kid in school has a screen reader on and goes to a Wikipedia or other page containing math, it just works for them. I still think this is possible.”
We agree on that: when running a screen reader with MathJax, the experience should be seamless.
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 12:08 PM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
First, sorry for lack of threading. I’m using github’s email response mechanism, and I don’t have any feedback about whether it groups or threads messages correctly. I am responding to the cookie message on this thread. Sorry for any confusion on that.
I hear you on the AT actuating the right values within the cookie, but there are many instances where I’m not sure that’s going to work. I feel that we still have a strong requirement for the user to indicate necessity of MathML when the AT doesn’t work or in a variety of instances where that value is lost. There is also a significant privacy issue here. what we’re proposing is that folks have to indicate the status of their disability or at least that they are using AT. And, for most users, they won’t even know this is going on. to me, that’s a pretty big deal, not because I care, personally, if a website knows that I’m blind, but because I know many people will and frankly, have perfect reason for doing so.
RE performance hit: Am I correct in my understanding that rendering the MathML off screen also incurs this performance penalty? If it doesn’t, Neil was telling me that there’s an example, and we need to find the URL of this example, that as long as the div is on screen, then the math can be positioned off screen, and then the user can still touch the visual math image but hear the MathML. We should verify that to at least address the off screen concerns from earlier.
My basic intended use case is that when a kid in school has a screen reader on and goes to a Wikipedia or other page containing math, it just works for them. I still think this is possible.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:38 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Sina, it’s possible you misunderstood my comment, assuming that you were indeed responding to my comment. I believe we are in agreement. I, too, want MathJax to “just work” with ATs. However, I think Peter ‘s objection to having MathML embedded all the time is that there is a performance penalty for the vast majority of users who don’t use AT with MathJax. Therefore, to try to come to some solution that would accommodate both sets of users, ATs and non-ATs alike, I suggested using the MathJax cookie as a way for the AT itself to do the work programmatically that the user would have to do manually.
Thanks,
RG
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:28 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
The last thing we need is to have an AT user jump through more hoops. We don’t ask users if they wat the alt text on an image or if they would like certain accessibility features turned on in a page. I really do understand the simplistic appeal to ask users, but I view it as an utter last resort. We need the math to “just work”, not have someone turn something on by finding it, and then having to reload a page and then having that setting lost in incognito/privacy mode, etc.
I strongly disagree with this approach.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:22 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
I don’t hold with your assertion that “this is not a good practice from an accessibility point of view.” We don’t need to convince all AT to do it. But those who want to make it easier for their users should have the option. And an AT user by definition wants basic access. And like all users of any type of software, they want it to be as hassle free as possible.
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:02 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
This is not a good practice from an accessibility point of view. There’s no way we can convince all AT to do it, and while it’s appealing from a development standpoint, it’s not good to force users to opt into basic access.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 9:06 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Would it be possible for an AT to set a flag in the MathJax cookie so that the AT's users wouldn't have to opt-in for accessibility?
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101656609 . https://github.com/notifications/beacon/ABui7cHmALU_Y966Vhv1kkoNU8wHFTHbks5oI0OlgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-101704751.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101713672 . https://github.com/notifications/beacon/ABui7eKF-mIC9WBg4rrfrBS-Pn7WXZhyks5oI2OEgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-101715310.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101718628 . https://github.com/notifications/beacon/ABui7RJ3xEm2c45nYRDSZRLPQETopAjmks5oI2dHgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-101726526.

Per the below/above
Neil and I verified that one can swipe to MathML that has been minimized to 1px by 1px, but not touch it. this seems perfectly acceptable.
From: Sina Bahram [mailto:sina@sinabahram.com]
Sent: Wednesday, May 13, 2015 12:08 PM
To: 'mathjax/MathJax'
Subject: RE: [MathJax] Expose MathML for accessibility (#938)
First, sorry for lack of threading. I’m using github’s email response mechanism, and I don’t have any feedback about whether it groups or threads messages correctly. I am responding to the cookie message on this thread. Sorry for any confusion on that.
I hear you on the AT actuating the right values within the cookie, but there are many instances where I’m not sure that’s going to work. I feel that we still have a strong requirement for the user to indicate necessity of MathML when the AT doesn’t work or in a variety of instances where that value is lost. There is also a significant privacy issue here. what we’re proposing is that folks have to indicate the status of their disability or at least that they are using AT. And, for most users, they won’t even know this is going on. to me, that’s a pretty big deal, not because I care, personally, if a website knows that I’m blind, but because I know many people will and frankly, have perfect reason for doing so.
RE performance hit: Am I correct in my understanding that rendering the MathML off screen also incurs this performance penalty? If it doesn’t, Neil was telling me that there’s an example, and we need to find the URL of this example, that as long as the div is on screen, then the math can be positioned off screen, and then the user can still touch the visual math image but hear the MathML. We should verify that to at least address the off screen concerns from earlier.
My basic intended use case is that when a kid in school has a screen reader on and goes to a Wikipedia or other page containing math, it just works for them. I still think this is possible.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:38 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Sina, it’s possible you misunderstood my comment, assuming that you were indeed responding to my comment. I believe we are in agreement. I, too, want MathJax to “just work” with ATs. However, I think Peter ‘s objection to having MathML embedded all the time is that there is a performance penalty for the vast majority of users who don’t use AT with MathJax. Therefore, to try to come to some solution that would accommodate both sets of users, ATs and non-ATs alike, I suggested using the MathJax cookie as a way for the AT itself to do the work programmatically that the user would have to do manually.
Thanks,
RG
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:28 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
The last thing we need is to have an AT user jump through more hoops. We don’t ask users if they wat the alt text on an image or if they would like certain accessibility features turned on in a page. I really do understand the simplistic appeal to ask users, but I view it as an utter last resort. We need the math to “just work”, not have someone turn something on by finding it, and then having to reload a page and then having that setting lost in incognito/privacy mode, etc.
I strongly disagree with this approach.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:22 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
I don’t hold with your assertion that “this is not a good practice from an accessibility point of view.” We don’t need to convince all AT to do it. But those who want to make it easier for their users should have the option. And an AT user by definition wants basic access. And like all users of any type of software, they want it to be as hassle free as possible.
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 11:02 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
This is not a good practice from an accessibility point of view. There’s no way we can convince all AT to do it, and while it’s appealing from a development standpoint, it’s not good to force users to opt into basic access.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, May 13, 2015 9:06 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Would it be possible for an AT to set a flag in the MathJax cookie so that the AT's users wouldn't have to opt-in for accessibility?
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101656609 . https://github.com/notifications/beacon/ABui7cHmALU_Y966Vhv1kkoNU8wHFTHbks5oI0OlgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-101704751.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101713672 . https://github.com/notifications/beacon/ABui7eKF-mIC9WBg4rrfrBS-Pn7WXZhyks5oI2OEgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-101715310.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101718628 .  https://github.com/notifications/beacon/ABui7RJ3xEm2c45nYRDSZRLPQETopAjmks5oI2dHgaJpZM4CxCK5.gif

Neil and I verified that one can swipe to MathML that has been minimized to 1px by 1px, but not touch it. this seems perfectly acceptable.

What about the MathJax menu btw? James said that you can not route the mouse to some "hidden" math, but for the special technique of 1px by 1px (which is not entirely hidden) it might be possible to do so.

what we’re proposing is that folks have to indicate the status of their disability or at least that they are using AT

Note that the Firefox native MathML add-on creates the cookie at page opening and delete it once the page is loaded:
https://github.com/fred-wang/Mathzilla/blob/master/mathjax-native-mathml/data/menu-cookie.js
and it really just says "I want to use native MathML" not that you are blind.
Of course it would be better if MathJax could just always put standard markup by default as KaTeX and Wikipedia do, with a CSS hack that could easily be reverted with a user stylesheet. But reading Peter's comment, the MathJax team is unlikely to accept this approach. All the approaches proposed would 1) require some work for users to switch to a mode with MathML and 2) make MathJax's performance even worse that it is already.

Is there a page to check out the menu for keyboard and other accessibility in the form that you’re thinking of implementing it?
From: Frédéric Wang [mailto:notifications@github.com]
Sent: Thursday, May 14, 2015 2:25 AM
To: mathjax/MathJax
Cc: Sina Bahram
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Neil and I verified that one can swipe to MathML that has been minimized to 1px by 1px, but not touch it. this seems perfectly acceptable.
What about the MathJax menu btw? James said that you can not route the mouse to some "hidden" math, but for the special technique of 1px by 1px (which is not entirely hidden) it might be possible to do so.
what we’re proposing is that folks have to indicate the status of their disability or at least that they are using AT
Note that the Firefox native MathML add-on creates the cookie at page opening and delete it once the page is loaded:
https://github.com/fred-wang/Mathzilla/blob/master/mathjax-native-mathml/data/menu-cookie.js
and it really just says "I want to use native MathML" not that you are blind.
Of course it would be better if MathJax could just always put standard markup by default as KaTeX and Wikipedia do, with a CSS hack that could easily be reverted with a user stylesheet. But reading Peter's comment, the MathJax team is unlikely to accept this approach. All the approaches proposed would 1) require some work for users to switch to a mode with MathML and 2) make MathJax's performance even worse that it is already.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-101934230 .  https://github.com/notifications/beacon/ABui7bmufn2cxbKbfJ47qvQdP82kHY62ks5oJDctgaJpZM4CxCK5.gif

Would it be possible for an AT to set a flag in the MathJax cookie so that the AT's users wouldn't have to opt-in for accessibility?

I don't think that's possible in browsers where we can't call JavaScript, which basically means anything other than Internet Explorer.

What about the MathJax menu btw? James said that you can not route the mouse to some "hidden" math, but for the special technique of 1px by 1px (which is not entirely hidden) it might be possible to do so.

That might work for the menu, as long as right clicking the pixel occupied by the fake (1px by 1px) native MathML activates the menu.

Thanks again for providing more input.
Here's what the next steps are from the MathJax team (fyi that's @dpvc, @zorkow, @christianp, @pkra).

implement the extension as described above ("hidden" MML in the DOM and in a data-attribute)

Evaluate its impact on performance (which, fyi, is due to generating MathML from our internal data model)

Resolve #939 (making the menu accessible)
Revisit the idea of an opt-in (especially regarding privacy)
When we get to re-writing some of our internals, we want this extension to become core behavior.

We are temporarily locking this thread to reduce noise and frustration on all sides. We will unlock the issue once we get back to working on these items (fyi, this issue remains in the milestone for the next release but the extension could be cherry picked as soon as it's done). Feel free to post on mathjax-dev@googlegroups.com for general discussions or reach out to me personally.

Some preliminary test results for the AssistiveMML.js extension.

NVDA:

IE9, Win7
works
except that I'm confused. With MathPlayer4 installed, IE9  crashed reliably. After deinstalling MathPlayer, things worked on IE. I thought NVDA needed MathPlayer?
IE10, WIn8

It looks like aria-hidden fails to be set on the visual output. So NVDA reads both.
I ran into similar problems at first (MathPlayer crashing). For some reason, the crashes stopped. I have no idea why though. But once it stopped crashing, the MathML was read correctly.

FF 39 (Win7, Win8) works fine
Chrome. (Win7, Win8). NVDA skips the math; but the extension works as expected.

VoiceOver

Yosemite Safari seems to work.
I'm not quite sure what to expect; it reads content several times (but only MathML content as math); that's probably just my inability to navigate. I'm guessing things are alright on our end?
will test iOS8 when I get a chance.

PS: I've unlocked the issue.

The extension is available in the assistive-mml branch of my fork of MathJax.  It has not yet been merged to the develop branch.  The details of what aria labels should be used where still needs to be settled.

For the record, that branch is https://github.com/dpvc/MathJax/tree/assistive-mml

Peter,
Have you run any tests with JAWS? Let me know if you need assistance with that.
Thanks,
RG
From: Peter Krautzberger [mailto:notifications@github.com]
Sent: Wednesday, August 05, 2015 7:38 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Some preliminary test results for the AssistiveMML.js extension.

NVDA:
*   IE9, Win7

works
except that I'm confused. With MathPlayer4 installed, IE9 crashed reliably. After deinstalling MathPlayer, things worked on IE. I thought NVDA needed MathPlayer?

 *   IE10, WIn8
    *   It looks like aria-hidden fails to be set on the visual output. So NVDA reads both.
    *   I ran into similar problems at first (MathPlayer crashing). For some reason, the crashes stopped. I have no idea why though. But once it stopped crashing, the MathML was read correctly.
 *   FF 39 (Win7, Win8) works fine
 *   Chrome. (Win7, Win8). NVDA skips the math; but the extension works as expected.

VoiceOver
*   Yosemite Safari seems to work.

I'm not quite sure what to expect; it reads content several times (but only MathML content as math); that's probably just my inability to navigate. I'm guessing things are alright on our end?
will test iOS8 when I get a chance.

—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-127966892.

@fsrg I'm afraid I don't have access to JAWS. It would be great to hear if things work there.
If you do, here's a live page you could try: https://rawgit.com/pkra/ac7d48279728d3ab5881/raw/bb676922f161233224a1aa73b3ba9caf53539225/mathjax-assistivemml.html

On that page (great page, by the way, nice tests),
Jaws 16, latest rev, IE 11, latest patches, win 7 pro, results in them being read as well as Jaws can. Nothing on your end to fix there.
However, same setup, but with NVDA, latest nightly, NVDA first reads the raw mathml representation that would have been read such as “a question mark 0” before reading “a not equal to zero”
President, Prime Access Consulting, Inc.
Twitter: @SinaBahram
Company Website: http://www.pac.bz
Personal Website: http://www.sinabahram.com
Blog: http://blog.sinabahram.com
From: Peter Krautzberger [mailto:notifications@github.com]
Sent: Wednesday, August 05, 2015 9:18 AM
To: mathjax/MathJax MathJax@noreply.github.com
Cc: Sina Bahram sina@sinabahram.com
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
@fsrg https://github.com/fsrg  I'm afraid I don't have access to JAWS. It would be great to hear if things work there.
If you do, here's a live page you could try: https://rawgit.com/pkra/ac7d48279728d3ab5881/raw/bb676922f161233224a1aa73b3ba9caf53539225/mathjax-assistivemml.html
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-127994530 .  https://github.com/notifications/beacon/ABui7bLCRygVqI9a29QiYsDUpWBrddyxks5okgR1gaJpZM4CxCK5.gif

@sinabahram thanks!

Jaws 16, latest rev, IE 11, latest patches, win 7 pro, results in them being read as well as Jaws can. Nothing on your end to fix there.

Fair enough.

However, same setup, but with NVDA, latest nightly, NVDA first reads the raw mathml representation that would have been read such as “a question mark 0” before reading “a not equal to zero”

Ok. I'll check out IE11 some more.

One more data point.

VoiceOver iOS8

the "slide two fingers from top to read screen" method works ok. It reads out the MathML but the highlighting is trying to highlight the hidden MathML.
Manual navigation (tapping on an equation, double tapping to go fullscreen) did not work. I'm guessing I couldn't hit that 1px box of the hidden MathML. Tricking it by doing a selection for copying fails badly, reading just the characters from both MathML and MathJax output; this seems expected behavior given how copy&paste strips out markup in general.
Overall, the expected results, I think.

One question I have is about @jcsteh's concerns about accessing the MathJax menu.  The current hidden MathML is inside a container that has the HTM-CSS output (with aria-hidden="true"), and that container has the event handlers for the contextual menu (and a click handler for when the contextual menu is set to pass through to the browser contextual menu).  Does this make it possible to access the MathJax contextual menu in screen readers?  Does this cause other side effects?  I have had VoiceOver read "clickable" after every term in the MathML, but I admit it is a very old version of VoiceOver, so things might work better now.
I'm not entirely sure what to do about users who are working mouse-less and need to use tab to access things like menus.  What is the right way to give them access to the MathJax menu without causing problems for other users?  (Perhaps I should start a new issue for this?)

(Perhaps I should start a new issue for this?)

There's #939 and #1093 but maybe a meta issue is suitable.

Manual navigation (tapping on an equation, double tapping to go fullscreen) did not work.

Can you be more specific about what this is supposed to do?  Is tapping on the expression supposed to read it?  What does "go full screen" mean in terms of a screen reader?  Do you want the whole math expression to be zoomed to full screen size?  (This doesn't seem to involve the screen reader, so I'm a little confused.)

(Perhaps I should start a new issue for this?)

There's #939 and #1093 but maybe a meta issue is suitable.

I was hoping for comments from the AT community (who have been active here), which is why I posted here first.  I'm not sure any of them are following those issues.

Can you be more specific about what this is supposed to do?

Tapping on an element reads it out loud. For math you get a friendly reminder at the end of your reading to "double tap to zoom"; double tapping then makes the equation full screen, it goes on to read the first subexpression, and then you can iterate that with subexpressions (tap to read, double tap to zoom etc).

I'm not sure any of them are following those issues.

Right. Just wanted to point out that those issues exist.

Thanks for the extra info about double-tapping.  I wonder if it would be possible for MathJax to transfer the tap events to the MathML element via some sort of dispatchEvent() call?

A critical piece is not mentioned here, which is swiping to it. so take one finger and swipe rapidly from left/right or right/left. You can think of this as tab and shift+tab. I would touch close to the math and then begin swiping.
President, Prime Access Consulting, Inc.
Twitter: @SinaBahram
Company Website: http://www.pac.bz
Personal Website: http://www.sinabahram.com
Blog: http://blog.sinabahram.com
From: Peter Krautzberger [mailto:notifications@github.com]
Sent: Wednesday, August 05, 2015 2:38 PM
To: mathjax/MathJax MathJax@noreply.github.com
Cc: Sina Bahram sina@sinabahram.com
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
One more data point.

VoiceOver iOS8

the "slide two fingers from top to read screen" method works ok. It reads out the MathML but the highlighting is trying to highlight the hidden MathML.

Manual navigation (tapping on an equation, double tapping to go fullscreen) did not work. I'm guessing I couldn't hit that 1px box of the hidden MathML. Tricking it by doing a selection for copying fails badly, reading just the characters from both MathML and MathJax output; this seems expected behavior given how copy&paste strips out markup in general.

Overall, the expected results, I think.

—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-128103084 .  https://github.com/notifications/beacon/ABui7bU-k70jALuefrHTVct0JJlAuOsvks5okk96gaJpZM4CxCK5.gif

@sinabahram ah, I did not know that -- thanks.
So that sliding works, too. The math is read is out and the visual rendering is skipped.
You can additionally double-tap the highlighted area to trigger full screen exploration (though you obviously get Safari/WebKit rendering at that point).

Understood. that makes sense.
President, Prime Access Consulting, Inc.
Twitter: @SinaBahram
Company Website: http://www.pac.bz
Personal Website: http://www.sinabahram.com
Blog: http://blog.sinabahram.com
From: Peter Krautzberger [mailto:notifications@github.com]
Sent: Wednesday, August 05, 2015 3:10 PM
To: mathjax/MathJax MathJax@noreply.github.com
Cc: Sina Bahram sina@sinabahram.com
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
@sinabahram https://github.com/sinabahram  ah, I did not know that -- thanks.
So that sliding works, too. The math is read is out and the visual rendering is skipped.
You can additionally double-tap the highlighted area to trigger full screen exploration (though you obviously get Safari/WebKit rendering at that point).
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-128113184 .  https://github.com/notifications/beacon/ABui7Zvmmi4yfNsW2zFIpK0qf8zDKRfzks5oklcBgaJpZM4CxCK5.gif

Davide, I'm trying to get a more in-depth answer for you on this; so a response may not be immediate.
Thanks,
RG
From: Davide P. Cervone [mailto:notifications@github.com]
Sent: Wednesday, August 05, 2015 2:43 PM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
One question I have is about @jcstehhttps://github.com/jcsteh's concerns about accessing the MathJax menu. The current hidden MathML is inside a container that has the HTM-CSS output (with aria-hidden="true"), and that container has the event handlers for the contextual menu (and a click handler for when the contextual menu is set to pass through to the browser contextual menu). Does this make it possible to access the MathJax contextual menu in screen readers? Does this cause other side effects? I have had VoiceOver read "clickable" after every term in the MathML, but I admit it is a very old version of VoiceOver, so things might work better now.
I'm not entirely sure what to do about users who are working mouse-less and need to use tab to access things like menus. What is the right way to give them access to the MathJax menu without causing problems for other users? (Perhaps I should start a new issue for this?)
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-128104292.

@fsrg, Thanks!  Your input will be greatly appreciated.

The math seems to read correctly in Firefox with Jaws 16.
Aaron

Thanks for letting us know, @cannona!

Davide, I don’t think there is a great way to give programmatic access to the context menu that will work in all browsers. I wonder though if a hot key might work? As long as the key is unlikely to be used by the chrome or the page it’s embedded in, it might be an acceptable way for users to access the MathJax context menu.
Thanks,
RG
From: Davide P. Cervone [mailto:notifications@github.com]
Sent: Wednesday, August 05, 2015 2:43 PM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
One question I have is about @jcstehhttps://github.com/jcsteh's concerns about accessing the MathJax menu. The current hidden MathML is inside a container that has the HTM-CSS output (with aria-hidden="true"), and that container has the event handlers for the contextual menu (and a click handler for when the contextual menu is set to pass through to the browser contextual menu). Does this make it possible to access the MathJax contextual menu in screen readers? Does this cause other side effects? I have had VoiceOver read "clickable" after every term in the MathML, but I admit it is a very old version of VoiceOver, so things might work better now.
I'm not entirely sure what to do about users who are working mouse-less and need to use tab to access things like menus. What is the right way to give them access to the MathJax menu without causing problems for other users? (Perhaps I should start a new issue for this?)
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-128104292.

@fsrg, the contextual menu is equation-specific, so if the key event listener was bound to the container element just like the current menu listener, then that would probably work.  That would also solve the issue for those using tabbing (if, we added a TABINDEX somewhere), right?  Of course, that would mean that people would have to tab through all the math whenever they tab around the page.  That probably is too much.
Would it be acceptable to have a hotkey that turns on/off the TABINDEX for the math elements (i.e., toggles their focusability)?  Or is that also a privacy problem?

Could you explain why turning on the tab stops with a key is a privacy issue?
Thanks,
RG
From: Davide P. Cervone [mailto:notifications@github.com]
Sent: Sunday, August 09, 2015 3:16 PM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
@fsrghttps://github.com/fsrg, the contextual menu is equation-specific, so if the key event listener was bound to the container element just like the current menu listener, then that would probably work. That would also solve the issue for those using tabbing (if, we added a TABINDEX somewhere), right? Of course, that would mean that people would have to tab through all the math whenever they tab around the page. That probably is too much.
Would it be acceptable to have a hotkey that turns on/off the TABINDEX for the math elements (i.e., toggles their focusability)? Or is that also a privacy problem?
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-129227092.

Could you explain why turning on the tab stops with a key is a privacy issue?

I wasn't claiming that it was, I was asking if it was.  There was a lots of blow-back about suggesting that there be an opt-in for inserting the MathML into the page, and privacy was one reason (the page would know you are asking for assistive functionality).  A setting that toggles TABINDEX might be considered by some to be the same type of thing.  I'm not sure, which is why I asked.  Sorry for the confusion.

As long as the tab lands on the math only once, then shouldn’t we just leave that as default?
Especially, given that the Math is interactive with most screen readers these days.
From: Davide P. Cervone [mailto:notifications@github.com]
Sent: Monday, August 10, 2015 11:24 AM
To: mathjax/MathJax MathJax@noreply.github.com
Cc: Sina Bahram sina@sinabahram.com
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Could you explain why turning on the tab stops with a key is a privacy issue?
I wasn't claiming that it was, I was asking if it was. There was a lots of blow-back about suggesting that there be an opt-in for inserting the MathML into the page, and privacy was one reason (the page would know you are asking for assistive functionality). A setting that toggles TABINDEX might be considered by some to be the same type of thing. I'm not sure, which is why I asked. Sorry for the confusion.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-129493471 .  https://github.com/notifications/beacon/ABui7bfnuqmsOaAYwiaSX4WcHfnBCDeNks5omLlygaJpZM4CxCK5.gif

As long as the tab lands on the math only once, then shouldn’t we just leave that as default?

Again, I'm asking for advice from the community.  If a user is using tabbing to navigate among the various interactive pieces of the page, then would he or she really want to have to tab through all the math to get to that button near the bottom of the page?  On the other hand, if they don't then how will they be able to select the math element for which the hotkey would be active?  I don't do that kind of browser enough myself to make a good decision about that, and was hoping those with more experience would be able to give us some guidance.

I’m not sure how tabbing will work, since the browser won’t be able to turn the MathJax control into an MSAA or UIA role/control type. But maybe if you put an ARIA role on it we can get the type information that way.
Thanks,
RG
From: Davide P. Cervone [mailto:notifications@github.com]
Sent: Monday, August 10, 2015 2:03 PM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
As long as the tab lands on the math only once, then shouldn’t we just leave that as default?
Again, I'm asking for advice from the community. If a user is using tabbing to navigate among the various interactive pieces of the page, then would he or she really want to have to tab through all the math to get to that button near the bottom of the page? On the other hand, if they don't then how will they be able to select the math element for which the hotkey would be active? I don't do that kind of browser enough myself to make a good decision about that, and was hoping those with more experience would be able to give us some guidance.
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-129551222.

That’s exactly what I’m thinking. In fact, a math role would be appropriate here?
From: fsrg [mailto:notifications@github.com]
Sent: Monday, August 10, 2015 5:03 PM
To: mathjax/MathJax MathJax@noreply.github.com
Cc: Sina Bahram sina@sinabahram.com
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
I’m not sure how tabbing will work, since the browser won’t be able to turn the MathJax control into an MSAA or UIA role/control type. But maybe if you put an ARIA role on it we can get the type information that way.
Thanks,
RG
From: Davide P. Cervone [mailto:notifications@github.com]
Sent: Monday, August 10, 2015 2:03 PM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
As long as the tab lands on the math only once, then shouldn’t we just leave that as default?
Again, I'm asking for advice from the community. If a user is using tabbing to navigate among the various interactive pieces of the page, then would he or she really want to have to tab through all the math to get to that button near the bottom of the page? On the other hand, if they don't then how will they be able to select the math element for which the hotkey would be active? I don't do that kind of browser enough myself to make a good decision about that, and was hoping those with more experience would be able to give us some guidance.
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-129551222.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-129605422 .  https://github.com/notifications/beacon/ABui7dk8kYM4Ky8ZLzO_RsZEBZMRas_tks5omQjqgaJpZM4CxCK5.gif

Just an update for people on this thread. We've finished work on #939 (making the MathJax menu accessible).
I've updated the example mentioned earlier. We'd appreciate any and all feedback!

Ack -- @dpvc I just realized that the AssistiveMML branch is not yet merged into develop. So the updated demo is missing the extension. When do you think that will be merged?

I want to fix the aria stuff first, since the extension currently has to manipulate those (which was just intended as a temporary solution).  I hope to be able to work on it this weekend.

@dpvc no problem. I've reverted my change to the AssitiveMML demo (it might take a while until rawgit picks up on the change -- sorry about that).
I've created a separate demo for the menu at https://rawgit.com/pkra/4c57afc70c4f1a4fb356/raw/450265ccd8ed8ccfc78d2ad63fe988f96c4bc915/mathjax-accessiblemenu.html

That sample page does not work with any combination I tried. The four I tried quickly were NVDA+Firefox, Jaws16+Firefox, NVDA+IE11, and Jaws16+IE11.
I wasn’t able to read any of the mathematics as it did not show up as mathml on the page.
President, Prime Access Consulting, Inc.
Twitter: @SinaBahram
Company Website: http://www.pac.bz
Personal Website: http://www.sinabahram.com
Blog: http://blog.sinabahram.com
From: Peter Krautzberger [mailto:notifications@github.com]
Sent: Wednesday, September 09, 2015 3:50 AM
To: mathjax/MathJax MathJax@noreply.github.com
Cc: Sina Bahram sina@sinabahram.com
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
@dpvc https://github.com/dpvc  no problem. I've reverted my change to the AssitiveMML demo (it might take a while until rawgit picks up on the change -- sorry about that).
I've created a separate demo for the menu at https://rawgit.com/pkra/4c57afc70c4f1a4fb356/raw/450265ccd8ed8ccfc78d2ad63fe988f96c4bc915/mathjax-accessiblemenu.html
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-138815136 .  https://github.com/notifications/beacon/ABui7X8dV_IQKrqmV-O2DmRyYTCKA5Qbks5ov9wUgaJpZM4CxCK5.gif

FYI: JAWS will only use MathJax in IE.
Thanks,
RG
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, September 09, 2015 8:33 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
That sample page does not work with any combination I tried. The four I tried quickly were NVDA+Firefox, Jaws16+Firefox, NVDA+IE11, and Jaws16+IE11.
I wasn’t able to read any of the mathematics as it did not show up as mathml on the page.
President, Prime Access Consulting, Inc.
Twitter: @SinaBahram
Company Website: http://www.pac.bz
Personal Website: http://www.sinabahram.com
Blog: http://blog.sinabahram.com
From: Peter Krautzberger [mailto:notifications@github.com]
Sent: Wednesday, September 09, 2015 3:50 AM
To: mathjax/MathJax MathJax@noreply.github.com
Cc: Sina Bahram sina@sinabahram.com
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
@dpvc https://github.com/dpvc no problem. I've reverted my change to the AssitiveMML demo (it might take a while until rawgit picks up on the change -- sorry about that).
I've created a separate demo for the menu at https://rawgit.com/pkra/4c57afc70c4f1a4fb356/raw/450265ccd8ed8ccfc78d2ad63fe988f96c4bc915/mathjax-accessiblemenu.html
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-138815136 . https://github.com/notifications/beacon/ABui7X8dV_IQKrqmV-O2DmRyYTCKA5Qbks5ov9wUgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-138895187.

Thanks for the feedback!

That sample page does not work with any combination I tried.

This is totally my fault. Since I now mentioned two (three, four) different pages in the thread I can't tell which page you might refer to. My fault -- sorry about that!
Trying to recap:

To try the Assistive-MML extension (with embedded MathML for screenreaders) go to https://rawgit.com/pkra/ac7d48279728d3ab5881/raw/647c3169dcdcb52e797558c513a03f49e8061448/mathjax-assistivemml.html
To try the accessible menu (equation with tabindex, trigger menu with space etc) go to https://rawgit.com/pkra/4c57afc70c4f1a4fb356/raw/450265ccd8ed8ccfc78d2ad63fe988f96c4bc915/mathjax-accessiblemenu.html

Thanks for any additional feedback!

Ok, three out of four:
NVDA+Firefox works
Jaws+IE and Jaws+firefox work
However, NVDA+IE does not.
At a client site all week, but as I grab few moments here and there, I can test the menu and anything else you throw on here. thank you for all of your work on this!
From: Peter Krautzberger [mailto:notifications@github.com]
Sent: Wednesday, September 09, 2015 9:16 AM
To: mathjax/MathJax MathJax@noreply.github.com
Cc: Sina Bahram sina@sinabahram.com
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
Thanks for the feedback!
That sample page does not work with any combination I tried.
This is totally my fault. Since I now mentioned two (three, four) different pages in the thread I can't tell which page you might refer to. My fault -- sorry about that!
Trying to recap:

To try the Assistive-MML extension (with embedded MathML for screenreaders) go to https://rawgit.com/pkra/ac7d48279728d3ab5881/raw/647c3169dcdcb52e797558c513a03f49e8061448/mathjax-assistivemml.html
To try the accessible menu (equation with tabindex, trigger menu with space etc) go to https://rawgit.com/pkra/4c57afc70c4f1a4fb356/raw/450265ccd8ed8ccfc78d2ad63fe988f96c4bc915/mathjax-accessiblemenu.html

Thanks for any additional feedback!
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-138905832 .  https://github.com/notifications/beacon/ABui7Zqa1qXCWXybPfpE6H4SVe-v26Hqks5owCiegaJpZM4CxCK5.gif

No,  Jaws works fine with firefox as of a few updates ago. I can provide links if that’s helpful.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, September 09, 2015 9:13 AM
To: mathjax/MathJax MathJax@noreply.github.com
Cc: Sina Bahram sina@sinabahram.com
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
FYI: JAWS will only use MathJax in IE.
Thanks,
RG
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, September 09, 2015 8:33 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
That sample page does not work with any combination I tried. The four I tried quickly were NVDA+Firefox, Jaws16+Firefox, NVDA+IE11, and Jaws16+IE11.
I wasn’t able to read any of the mathematics as it did not show up as mathml on the page.
President, Prime Access Consulting, Inc.
Twitter: @SinaBahram
Company Website: http://www.pac.bz
Personal Website: http://www.sinabahram.com
Blog: http://blog.sinabahram.com
From: Peter Krautzberger [mailto:notifications@github.com]
Sent: Wednesday, September 09, 2015 3:50 AM
To: mathjax/MathJax MathJax@noreply.github.com
Cc: Sina Bahram sina@sinabahram.com
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
@dpvc https://github.com/dpvc no problem. I've reverted my change to the AssitiveMML demo (it might take a while until rawgit picks up on the change -- sorry about that).
I've created a separate demo for the menu at https://rawgit.com/pkra/4c57afc70c4f1a4fb356/raw/450265ccd8ed8ccfc78d2ad63fe988f96c4bc915/mathjax-accessiblemenu.html
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-138815136 . https://github.com/notifications/beacon/ABui7X8dV_IQKrqmV-O2DmRyYTCKA5Qbks5ov9wUgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-138895187.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-138905115 .  https://github.com/notifications/beacon/ABui7TYe1k-dE5twinN0KhdW-y5hkCmeks5owCfegaJpZM4CxCK5.gif

Re @fsrg

FYI: JAWS will only use MathJax in IE.

Actually,  we had good results with JAWS on Firefox using the new extension, cf. https://github.com/mathjax/MathJax-docs/issues/111
Re @sinabahram

However, NVDA+IE does not.

That's #1235 and seems to be caused by NVDA.
@sinabahram does the menu work for you (to some degree)?

JAWS does support MathML in Firefox. But it does not access content via MathJax in Firefox.
Thanks,
RG
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, September 09, 2015 9:29 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
No, Jaws works fine with firefox as of a few updates ago. I can provide links if that’s helpful.
From: fsrg [mailto:notifications@github.com]
Sent: Wednesday, September 09, 2015 9:13 AM
To: mathjax/MathJax MathJax@noreply.github.com
Cc: Sina Bahram sina@sinabahram.com
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
FYI: JAWS will only use MathJax in IE.
Thanks,
RG
From: Sina Bahram [mailto:notifications@github.com]
Sent: Wednesday, September 09, 2015 8:33 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
That sample page does not work with any combination I tried. The four I tried quickly were NVDA+Firefox, Jaws16+Firefox, NVDA+IE11, and Jaws16+IE11.
I wasn’t able to read any of the mathematics as it did not show up as mathml on the page.
President, Prime Access Consulting, Inc.
Twitter: @SinaBahram
Company Website: http://www.pac.bz
Personal Website: http://www.sinabahram.com
Blog: http://blog.sinabahram.com
From: Peter Krautzberger [mailto:notifications@github.com]
Sent: Wednesday, September 09, 2015 3:50 AM
To: mathjax/MathJax MathJax@noreply.github.com
Cc: Sina Bahram sina@sinabahram.com
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
@dpvc https://github.com/dpvc no problem. I've reverted my change to the AssitiveMML demo (it might take a while until rawgit picks up on the change -- sorry about that).
I've created a separate demo for the menu at https://rawgit.com/pkra/4c57afc70c4f1a4fb356/raw/450265ccd8ed8ccfc78d2ad63fe988f96c4bc915/mathjax-accessiblemenu.html
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-138815136 . https://github.com/notifications/beacon/ABui7X8dV_IQKrqmV-O2DmRyYTCKA5Qbks5ov9wUgaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-138895187.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-138905115 . https://github.com/notifications/beacon/ABui7TYe1k-dE5twinN0KhdW-y5hkCmeks5owCfegaJpZM4CxCK5.gif
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-138908968.

JAWS does support MathML in Firefox. But it does not access content via MathJax in Firefox.

Well, it does work anyway with the AssistiveMML extension :-)

FYI: JAWS will only use MathJax in IE.

This sounds like JAWS is detecting MathJax in IE and calling on it directly?  In that case, will the added MathML in the DOM cause problems (like reading the math twice) for JAWS in IE?

I don’t think so, provided that the MathML in the dom is inside the MathJax element JAWS looks for when determining if it has encountered MathJax. As I recall, it is one of the top level elements.
Thanks,
RG
From: Davide P. Cervone [mailto:notifications@github.com]
Sent: Friday, September 11, 2015 10:49 AM
To: mathjax/MathJax
Cc: Rob Gallo
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
FYI: JAWS will only use MathJax in IE.
This sounds like JAWS is detecting MathJax in IE and calling on it directly? In that case, will the added MathML in the DOM cause problems (like reading the math twice) for JAWS in IE?
—
Reply to this email directly or view it on GitHubhttps://github.com/mathjax/MathJax/issues/938#issuecomment-139565376.

According to feedback from other JAWS users and my own testing, JAWS does not read things twice in IE. See the MathJax-docs issue for further details.

OK, great!  That sounds good (the MathML is inside the top-level MathJax element container).

I've merged the assistive-mml branch into develop.

If there’s a new test page, I’m happy to test the standard four configurations.
And, I’m happy to also test the menu and tabbability of the math.
From: Davide P. Cervone [mailto:notifications@github.com]
Sent: Friday, September 11, 2015 7:44 PM
To: mathjax/MathJax MathJax@noreply.github.com
Cc: Sina Bahram sina@sinabahram.com
Subject: Re: [MathJax] Expose MathML for accessibility (#938)
I've merged the assistive-mml branch into develop.
—
Reply to this email directly or view it on GitHub https://github.com/mathjax/MathJax/issues/938#issuecomment-139687746 .  https://github.com/notifications/beacon/ABui7XbAzEs8ABK1xgKZUf1zevjHZsWKks5ow16kgaJpZM4CxCK5.gif

I'm closing this issue, since the code is merged, and we are in the testing phase for the v2.6 release.  If any new problems are discovered, a new issue should be opened for them at this point.

authors: NSoiffer cannona dpvc fleizach fred-wang fsrg jcsteh pkra sinabahram

repo: mathjax/MathJax