Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE10+ NVDA reading MathML as string #5283

Closed
nvaccessAuto opened this issue Aug 11, 2015 · 15 comments
Closed

IE10+ NVDA reading MathML as string #5283

nvaccessAuto opened this issue Aug 11, 2015 · 15 comments
Labels

Comments

@nvaccessAuto
Copy link

Reported by peterk on 2015-08-11 18:42
Hi,

At MathJax we've almost completed an extension to embed the underlying MathML in the DOM, visually hiding it while hiding the visual output from AT.

NVDA picks it up pretty well in general, cf. our notes at mathjax/MathJax-docs#111 and a live sample at https://goo.gl/Qg0zXU

However, on IE10+ MathML is (usually) not detected correctly by NVDA and read as a string of text. In some situations NVDA reads both the MathML and the aria-hidden content; cf. mathjax/MathJax#1235 for some discussions.

In any case, we're wondering if we are doing something wrong or if there is at least way to work around these issues.

We would greatly appreciate some pointers!

Best regards,
Peter Krautzberger from MathJax.

@nvaccessAuto
Copy link
Author

Comment 1 by peterk on 2015-08-11 18:56
After further discussion on our end, I realize I may have misunderstood the reliance on MathPlayer.

With MathPlayer installed, the aria-hidden=true is somehow lost and both MathML and the visual output are read. This might be a MathPlayer bug, I suppose. Perhaps someone here knows more.

Best regards,
Peter.

@pkra
Copy link

pkra commented Nov 16, 2015

Just to ping here. The basic aria-hidden problem looks fixed in current builds -- thank you!

The MathML specific problem persists. NVDA with MathPlayer reads the MathML twice, first as a "string" and then correctly. Here's a simple example. Note that MathJax is not involved in this bug.

<!DOCTYPE html>
<html>
<head>
<title>NVDA MathML test</title>
</head>
<body>

A fraction: 
<math>
  <mfrac>
    <mi>x</mi>
    <mn>2</mn>
  </mfrac>
</math>

</body>
</html>

@jcsteh
Copy link
Contributor

jcsteh commented Nov 17, 2015

I can't reproduce this. How exactly are you reading the math? When I first open the document or if I press NVDA+upArrow to read the current line, I hear "A fraction: x over 2".

Do you have the MathPlayer IE plug-in running? (You don't need this for NVDA, though you obviously won't see math visually if you don't.) I don't here and I'm wondering whether that's the difference.

@pkra
Copy link

pkra commented Nov 17, 2015

Hm... I am very certain that I ran into this problem yesterday. But today, after rebooting the VM, I cannot reproduce this in IE10 / Win 7 or IE11 / Win 8.1. Even uninstalling/reinstalling MathPlayer does not reproduce this (though I didn't try a clean VM to rule out something was left in the system). But to answer your question, I had not enabled the MathPlayerBrowserHelper add-on.

I'll check with the team if anyone can still reproduce this. Sorry if it ends up just being noise!

@pkra
Copy link

pkra commented Nov 17, 2015

Should I open a separate issue for the MathJax-specific bug? Cf. this example reading "a fraction colon x 2 x over 2" http://s.codepen.io/pkra/debug/NGojag

@pkra
Copy link

pkra commented Nov 19, 2015

I've filed #5514 to separate out the MathJax issue. I think all other points on this issue have been resolved.

@jcsteh
Copy link
Contributor

jcsteh commented Nov 20, 2015

Okay. The string you're seeing here isn't actually the aria-hidden node. It's the parent of the math element. If you put role="presentation" on both the mjx-chtml class element and the MJX_Assistive_MathML class element, the string goes away.

I think the issue here is that IE, in its customary lack of a11y wisdom, exposes the descendant text on both of these elements as the name via MSAA. (AFAIK, this is a spec violation; we've hit this problem many times before.) We intentionally only render math as a space as far as text is concerned. However, when processing the two ancestors, NVDA realises there was only whitespace in the descendants and proceeds to render the name as a fallback.

There are two ways we could fix this:

  1. Find some way to ensure NVDA treats the math element as useful content and thus avoid the fallback. (For implementation reasons, this is much trickier than it sounds.)
  2. Find some way to detect this incorrect exposure of name and ignore it.

@pkra
Copy link

pkra commented Nov 20, 2015

Thanks so much for diving into this. I admit I don't fully understand your explanation for lack of knowledge on the different layers.

I know you've suggested role="presentation" to us in the past so apologies if I've asked this before. Are there any caveats if we changed our code to set presentation? In particular, do you happen to have an idea how switching over to presentation would affect other AT? We'll definitely give that a try and test things but I would feel if we could tap into your informed opinions as well.

@jcsteh
Copy link
Contributor

jcsteh commented Nov 26, 2015

I can't be sure about anything with other ATs. :)

role="presentation" basically causes that node to be ignored, but not any of its children. This will obviously mean you no longer have role="math", but I'm not convinced that's useful anyway, since the AT is really interested in the real MathML. I'm slightly concerned about the MathJax menu, since I'm guessing you have to right click on one of those nodes to get it. However, I can't get that to appear even if I right click on any of the nodes in the test case you provided without modification.

@pkra
Copy link

pkra commented Nov 27, 2015

Thanks, James.

I can't be sure about anything with other ATs. :)

Understood :-) We'll try out role=presentation.

I'm slightly concerned about the MathJax menu, since I'm guessing you have to right click on one of those nodes to get it.

I think the MathJax menu won't be a problem since it is attached to a different (outer) node.

However, I can't get that to appear even if I right click on any of the nodes in the test case you provided without modification.

Hm. How are you triggering it? Also, have you tried the new keyboard navigation (i.e., space)?

@pkra
Copy link

pkra commented Nov 27, 2015

I think the MathJax menu won't be a problem since it is attached to a different (outer) node.

I wrote nonsense there. Your suggestion was to place role=presentation on the node with class="mjx-chtml" which is in fact the outermost node; what threw me was your comment about role=math (which is on a lower node). Setting role=presentation on the element with role=math did not help but on the outer node it did work just as you wrote. So that's awesome -- thanks!

That means we "lose" the menu (unless we added another wrapper, I suppose). But the menu still works, so I'm not sure what we lose. NVDA does not seem to announce anything about the menu. JAWS actually announces "clickable on mouse over" after every math expression -- which users have complained about; setting role=presentation means we lose that in JAWS. But since that clickable wasn't very informative anyway, maybe we shouldn't care? We couldn't find any best practices on implementing such a context menu (not in the wcag sense, which we hope we now follow in 2.6, but in the sense of good user experience). Sorry, this is getting off topic. We'll keep looking for a better UX for the menu; any informed opinions would be extremely welcome.

@jcsteh
Copy link
Contributor

jcsteh commented Dec 2, 2015

Hm. How are you triggering [the MathJax menu]?

I was trying to route the mouse to the node and right click. I tried both the outer wrapper and the hidden math. Testing again, it seems to work in IE, but not Firefox.

Also, have you tried the new keyboard navigation (i.e., space)?

I didn't know about that. It does work nicely, but the problem is that the wrapper has to get focus for that to work and screen reader users have to switch to focus mode or pass the key through (since space/enter clicks in browse mode/equivalent).

Unfortunately, the wrapper never gets focus now and that's due to role="presentation". Without role="presentation", NVDA does focus the wrapper when you move to the math. This probably isn't that useful anyway due to the space/enter thing I mentioned, but it is the sort of regression I was worried about.

I wrote nonsense there. Your suggestion was to place role=presentation on the node with class="mjx-chtml" which is in fact the outermost node; what threw me was your comment about role=math (which is on a lower node).

Actually, I was suggesting you place role="presentation" on "both the  mjx-chtml  class element and the  MJX_Assistive_MathML  class element". I have to set it on both in order for things to behave properly in IE.

@pkra
Copy link

pkra commented Dec 2, 2015

I'm hoping to move the discussion of the menu to mathjax/MathJax#1235 (comment) if that's ok.

Actually, I was suggesting you place role="presentation" on "both the mjx-chtml class element and the MJX_Assistive_MathML class element". I have to set it on both in order for things to behave properly in IE.

Right. That's what I did.

@bhavyashah
Copy link

Everything here seems sorted, the remainder of the issue was filed as a separate ticket, and most of the later discussion wasn't diagnostic. Thus, can this ticket be safely closed? @pkra @jcsteh

@ehollig
Copy link
Collaborator

ehollig commented Aug 6, 2017

Everything here seems sorted. Closing

@ehollig ehollig closed this as completed Aug 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants