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

Visual highlight should follow the navigation in math expression when in interactive mode #345

Open
CyrilleB79 opened this issue Feb 10, 2025 · 7 comments

Comments

@CyrilleB79
Copy link

Steps to reproduce

  • Enable Visual Highlight, at least browse mode cursor.
  • Navigate to a math expression
  • Enter interactive mode and explore the expression

Expected result

Browse mode cursor should help follow the selected subpart of the math expression being explored. Alternatively, another highlighter should allow to follow the subpart of the expression that is being explored, e.g. allow navigator object to follow the selected subpart of the math expression, so that navigator object highlight can be used.

Configuration

  • MathCAT 0.6.6
  • Chrome 132
  • NVDA 2024.4.2
  • Windows 10 22H2 (AMD64) build 19045.5371

Note

Maybe NVDA itself should provide some information or extension points to help the math provider to do this job. Please explain what should be additionally required from NVDA if needed.

@CyrilleB79
Copy link
Author

See also tsengwoody/Access8Math#108

@NSoiffer
Copy link
Owner

Thanks for adding this issue. It is something that I've thought about adding from time to time but was uncertain how useful it would be in a screen reader. I could even add highlighting during speech, not just during navigation as can be seen in the MathCAT demo page. To do the highlighting in the demo, MathCAT makes use of "id" attrs to identify where it is. I don't know how I could do that outside of an HTML page. On the other hand, I wasn't able to get the focus to change when navigating a Word doc, so maybe NVDA can't highlight elsewhere?

Is there some documentation or examples on how to do focus highlighting in NVDA?

@CyrilleB79
Copy link
Author

You may have a look on how highlighters are created in NVDA:
https://github.com/nvaccess/nvda/blob/master/source/visionEnhancementProviders/NVDAHighlighter.py

I do not know what would be the most useful / relevant: branch on an existing highlighter or create a new highlighter for maths?

@NSoiffer
Copy link
Owner

I spent about 15 minutes looking at the code and it isn't clear to me how I can hook in math. It seems to want to use EventExtensionPoints, but I don't see examples of highlighting use. Do you know any addons that make use of this? Seeing some example would be very helpful. Maybe I should post to the addons group?

@andrew-l-d
Copy link
Collaborator

At best the following is probably tangential to the discussion, so apologies if inappropriate here.
When using Access8Math I can use the NVDA Review Cursor to read the equation, but not with MathCAT. That has several advantages:

  1. Adds some flexibility when reading the equation
  2. Can check the spelling of terms
  3. Can expand to the military alphabet - e.g. b bravo, d delta, p popper
  4. Can read individual digits in long numbers
  5. Can, with some gymnastics, copy - say - a long number to the clipboard

@NSoiffer
Copy link
Owner

@andrew-l-d: Navigation by character is one of the long planned features (#110). One of these days... That would solve '2' and '4' on your list. '5' is already doable. MathCAT already has three modes of navigation. If more flexibility is needed, I'm interested to hear what is needed (please open a separate issue). MathCAT does have 10 place markers (keys 0 - 9) that can be used during navigation. You can set a place marker (cntl+n), move to it (n), or read it without moving the focus (shift+n). I don't think there are used much, but they do do some of the things a review cursor does. They were added to support things like systems of equations where you want to be able to compare two things to figure out what to multiple one line by so you can remove a variable from a line.

That leaves using the military alphabet as a missing feature. I could add an option to do speak the military alphabet instead of the letter. If I do that, I'd probably want to mirror an NVDA setting, but I couldn't find one and I don't hear it being used when I move by character. How do I turn that one in NVDA?

As for the review cursor, it sounds like something that potentially should be supported. Not being a screen reader user, I wasn't really aware of it. I tried to see what Access8Math does with the review cursor, but Access8Math didn't work for me (lots of console errors/beeps) -- not too surprising given that I'm running an alpha build of 2025.1. Given the 2D nature of math, can you describe how you would like it to work? Please open a separate issue for that.

@andrew-l-d
Copy link
Collaborator

andrew-l-d commented Mar 28, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants