mathjax / MathJax-a11y

MathJax Accessibility extensions
https://mathjax.github.io/MathJax-a11y/
Apache License 2.0
35 stars 19 forks source link

Disentangle collapse and explorer options #196

Open drlippman opened 7 years ago

drlippman commented 7 years ago

I'm noticing that equations as simple as f(x)=x and 2x=x+2 read as "collapsed equality". I'll fully admit I'm new to screenreading, but it seems like having to go into Explorer to read the equation for fairly short equalities like that would make screenreading the text much slower. Is there a way to prevent the collapsing? Am I missing something?

pkra commented 7 years ago

Is there a way to prevent the collapsing?

Yes. Check the Generation configuration option of the explorer, https://github.com/mathjax/MathJax-a11y/tree/master/docs#explorerjs

drlippman commented 7 years ago

Hmm. I tried all three options, and none seemed to change it from reading "collapsed equality"

pkra commented 7 years ago

Thanks for checking. I can confirm

Looks like a bug then.

drlippman commented 7 years ago

Perhaps not. From some discussion on #175, it seems like this is the expected and intended behavior. So this may be more of requesting an enhancement (adding an option to not collapse the speech output by default, or changing the algorithm that decides which equations to summarize) rather than reporting a bug. I personally like the idea of only summarizing display equations, but full acknowledge I don't have a solid understanding of what actually works best for screenreading users.

pkra commented 7 years ago

175 is about active exploration without the collapsing features; I'm referring to the top-level aria label which is generated for "read all" scenarios.

zorkow commented 7 years ago

175 is still related, because switching on the explorer will automatically start the collapsible feature. One reason is that we wanted the most concise reading exposed in the aria-labels. Those rely on the maction elements being available to compute the summary.

At the time it was a feature. But we can change that status to bug now. However, the new title of the thread is very misleading.

In general, we can now solve that problem as the new version of SRE can compute summaries without mactions. Obviously that does not change the problem of #175 that one does not always want summaries.

pkra commented 7 years ago

175 is still related, because switching on the explorer will automatically start the collapsible feature.

Hm. I remember that that was always the case, but that the explorer.generation option used to enable different default labels.

Now I'm not so sure anymore. Oh well.

However, the new title of the thread is very misleading.

This thread or #175? Feel free to rename.

zorkow commented 7 years ago

I ran into that problem the other day when I was putting together some test pages where I wanted explorer set by default but collapse always off, which could not be done, and I believe the aria-labels where the reason for that dependency. But we now have the technology in SRE to disentangle all that.

And we might as well then add an option on what type of labels should be generated.

drlippman commented 7 years ago

Sorry for the confusion, Peter. In referencing #175 I was trying to reference the discussion there, where Volker explained to me that the auto-collapsing of the speech aria-label was intentional, so not a bug. From a look at the code, it appears explorer.generation has to do with whether the full speech tree is generated in advance or on-demand, rather than controlling the initial aria-label.

For my interests, I'm less concerned about being able to disable collapse (as in 175), and more interested in the possibility of adding a menu option to change whether the initially generated aria-labels are collapsed or not. From my very limited understanding of the code, it looks like that could be done relatively simply by adding a menu option that changes the Walker used in Explorer.MakeSpeechTask.

If this seems like a reasonable idea, I'm willing to take a stab at implementing it.