mathlive icon indicating copy to clipboard operation
mathlive copied to clipboard

Screen readers say "blank"

Open NSoiffer opened this issue 6 years ago • 0 comments

Describe the bug This is an accessibility bug that has been around since the start. I've finally sat down to try and tackle it. This issue to discuss options to fix it.

The bug is that as you arrow around an expression, you will hear "blank" and then what you should hear in these browser/screenreader combinations:

  • Chrome with NVDA
  • Firefox with JAWS

In the other cases (which I think include VoiceOver), there doesn't seem to be a problem. I have no idea why JAWS/NVDA have this problem with different browsers.

To Reproduce

  1. Pick one of the browser/screenreader combinations above.
  2. Open up basic/index.html or mathlive.io in the browser you are testing.
  3. Start JAWS or NVDA (NVDA is a free download and JAWS runs for free for 40 minutes after boot).
  4. Click at the start of the math expression. Hit right arrow. You hear "blank" followed by the character after the cursor (after it moves right).

Some possible fixes Screenreaders say "blank" because the area of focus has no characters after the point of focus. In this case the point of focus is the <textarea> which is empty. Hence the word "blank". [again, no idea why that doesn't always happen]. Given this is inside of an area with role="application", they probably shouldn't say anything at anytime, but that's not the case.

As an experiment, I added an illegal Unicode character (U+08C0) into the textfield where it is set to an empty string in _onSelectionDidChange. That stopped NVDA from saying blank. It didn't know how to say the illegal character and said nothing [_need to check this is also true for JAWS and VoiceOver _]. The problem with this solution is that the character also ends up in the math.

An alternative that Sam Dooley did for his accessible editor is to bounce the selection to somewhere with some text (i.e., move it there and then back). He used U+2000 [blank dot pattern] but JAWS says "space", so that's not a good choice (might use to have worked).

Both solutions are hacks, but absent getting the screenreaders to change their behavior, I haven't come up with any other ideas.

I think just putting something in the <textarea> is simplest. That means that the character needs to get deleted before the screen updates. I suspect that's possible but haven't walked through the code to know when it is possible to pull the character out (or potentially when it can be added to avoid it showing up but still being there when the screenreader cares). Being an illegal character, it should be possible to always remove it before it really gets into mathlive if it is hard to target just the case of a keypress.

NSoiffer avatar Dec 07 '19 04:12 NSoiffer