{"action":"created","issue":{"url":"https://api.github.com/repos/mathjax/MathJax/issues/938","labels_url":"https://api.github.com/repos/mathjax/MathJax/issues/938/labels{/name}","comments_url":"https://api.github.com/repos/mathjax/MathJax/issues/938/comments","events_url":"https://api.github.com/repos/mathjax/MathJax/issues/938/events","html_url":"https://github.com/mathjax/MathJax/issues/938","id":46357063,"number":938,"title":"Expose MathML for accessibility","user":{"login":"jcsteh","id":4166475,"avatar_url":"https://avatars.githubusercontent.com/u/4166475?v=3","gravatar_id":"","url":"https://api.github.com/users/jcsteh","html_url":"https://github.com/jcsteh","followers_url":"https://api.github.com/users/jcsteh/followers","following_url":"https://api.github.com/users/jcsteh/following{/other_user}","gists_url":"https://api.github.com/users/jcsteh/gists{/gist_id}","starred_url":"https://api.github.com/users/jcsteh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcsteh/subscriptions","organizations_url":"https://api.github.com/users/jcsteh/orgs","repos_url":"https://api.github.com/users/jcsteh/repos","events_url":"https://api.github.com/users/jcsteh/events{/privacy}","received_events_url":"https://api.github.com/users/jcsteh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mathjax/MathJax/labels/Feature%20Request","name":"Feature Request","color":"0080FF"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mathjax/MathJax/milestones/7","html_url":"https://github.com/mathjax/MathJax/milestones/MathJax%20v2.6","labels_url":"https://api.github.com/repos/mathjax/MathJax/milestones/7/labels","id":960321,"number":7,"title":"MathJax v2.6","description":"The next release of MathJax focused on making the CommonHTML output feature complete and on par with the HTML-CSS and SVG output.","creator":{"login":"pkra","id":426686,"avatar_url":"https://avatars.githubusercontent.com/u/426686?v=3","gravatar_id":"","url":"https://api.github.com/users/pkra","html_url":"https://github.com/pkra","followers_url":"https://api.github.com/users/pkra/followers","following_url":"https://api.github.com/users/pkra/following{/other_user}","gists_url":"https://api.github.com/users/pkra/gists{/gist_id}","starred_url":"https://api.github.com/users/pkra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkra/subscriptions","organizations_url":"https://api.github.com/users/pkra/orgs","repos_url":"https://api.github.com/users/pkra/repos","events_url":"https://api.github.com/users/pkra/events{/privacy}","received_events_url":"https://api.github.com/users/pkra/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":0,"state":"open","created_at":"2015-02-01T18:10:29Z","updated_at":"2015-03-17T14:20:31Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2014-10-21T05:42:10Z","updated_at":"2015-03-20T04:42:40Z","closed_at":null,"body":"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.\r\n\r\nYou 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.\r\n\r\nOne 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.\r\n\r\nIf 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.\r\n\r\n/cc @pkra"},"comment":{"url":"https://api.github.com/repos/mathjax/MathJax/issues/comments/83903219","html_url":"https://github.com/mathjax/MathJax/issues/938#issuecomment-83903219","issue_url":"https://api.github.com/repos/mathjax/MathJax/issues/938","id":83903219,"user":{"login":"sinabahram","id":1811181,"avatar_url":"https://avatars.githubusercontent.com/u/1811181?v=3","gravatar_id":"","url":"https://api.github.com/users/sinabahram","html_url":"https://github.com/sinabahram","followers_url":"https://api.github.com/users/sinabahram/followers","following_url":"https://api.github.com/users/sinabahram/following{/other_user}","gists_url":"https://api.github.com/users/sinabahram/gists{/gist_id}","starred_url":"https://api.github.com/users/sinabahram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinabahram/subscriptions","organizations_url":"https://api.github.com/users/sinabahram/orgs","repos_url":"https://api.github.com/users/sinabahram/repos","events_url":"https://api.github.com/users/sinabahram/events{/privacy}","received_events_url":"https://api.github.com/users/sinabahram/received_events","type":"User","site_admin":false},"created_at":"2015-03-20T04:42:40Z","updated_at":"2015-03-20T04:42:40Z","body":"I’m typing out loud here.\n\n \n\nRegarding 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.\n\n \n\nI’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.\n\n \n\nRegarding 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.\n\n \n\nThere 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.\n\n \n\nThoughts?\n\n \n\n \n\nFrom: jcsteh [mailto:notifications@github.com] \nSent: Thursday, March 19, 2015 11:48 PM\nTo: mathjax/MathJax\nCc: Sina Bahram\nSubject: Re: [MathJax] Expose MathML for accessibility (#938)\n\n \n\ndata-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.\n\nThere are two problems with these \"hiding\" solutions:\n\n1.\tBecause there's no explicit facility for having content visible to accessibility but hidden visually, different ATs may handle it differently.\n2.\tEven 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.\n\nI 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.\n\n—\nReply 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> \n\n"}}