NSoiffer / MathCAT

MathCAT: Math Capable Assistive Technology for generating speech, braille, and navigation.
MIT License
61 stars 35 forks source link

Issues with navigating multi-line Math blocks #210

Closed bhavyashah closed 3 weeks ago

bhavyashah commented 1 year ago

Consider $\begin{aligned} E\left(Y{n}\right) & =\int{0}^{\theta} x n \theta^{-n} x^{n-1} d x \ & =n \theta^{-n} \int_{0}^{\theta} x^{n} d x \ & =n \theta^{-n} \frac{\theta^{n+1}}{n+1} \ & =\frac{n}{n+1} \theta . \end{aligned}$ Press NVDA+Alt+m to start navigation and then mess around in it with Ctrl+arrow keys and just arrow keys. I distill these issues below:

  1. Immediately on entering navigation, press Ctrl+left/right arrows. NVDA says "not in table." Press right arrow and notice that you are in fact in a table.
  2. Get to row 1 column 2 and press Ctrl+left arrow. NVDA says "column 1 no previous column."
  3. Press NVDA+Alt+m to start navigation, press down arrow once, and press Ctrl+down arrow. NVDA says "Error in navigating math: see NVDA error log for details." Below is the relevant log snippet: "IO - inputCore.executeGesture (11:23:50.457) - winInputHook (18244): Input: kb(laptop):control+downArrow ERROR - external:globalPlugins.MathCAT.MathCAT.MathCATInteraction.script_navigate (11:23:50.505) - MainThread (4492): Internal error: Navigation exceeded limit of number of times no speech generated. IO - speech.speech.speak (11:23:50.505) - MainThread (4492): Speaking ['Error in navigating math: see NVDA error log for details']"
  4. More fundamentally, I don't understand why MathCAT initially calls this a 4-line expression (perhaps a 4X1 table) and when navigating, I am actually in a 4X2 table.

[Update: edited to use numbered lists for easy reference of problems]

bhavyashah commented 1 year ago

Oops, wrong project again - my bad! Please transfer (and can I transfer tickets myself in the future?).

NSoiffer commented 1 month ago

Sorry for being slow to address this...

Issue one is still there. It seems that left/right arrow aren't working correctly for mtr. So this is a bug.

Issues two and three don't seem to be present anymore.

The answer to issue 4 is that MathCAT is being smart and recognizing that the table representation is really a presentation artifact for alignment reasons and that it is really four separate "lines". Hence, I think it is a feature that it says "4 lines, line 1", etc. However, I didn't update the navigation code to be smart, so the bug is that navigation code needs to be smarter and ignore the columns and say "line" and not row. That might take some work, so I've broken that out as its own bug report: #282.