nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
Other
2.02k stars 624 forks source link

Add tests for navigation in browse mode documents and improve tests for textInfo #16578

Open Adriani90 opened 1 month ago

Adriani90 commented 1 month ago

Is your feature request related to a problem? Please describe.

Features related to navigation paterns in Browse mode documents might introduce scripts to move the virtual cursor to specific parts of a document. This usually relies on internal and external textInfo related functions. In such cases, NVDA will use textInfo and will analyse the document character by character to find the desired location where the cursor should be moved to. However, in many cases textInfo will not be able to provide the correct function so the navigation will fail. This might also be related to external issues where the software does not provide the correct definition of characters, words, paragraphs, boundaries, etc. Also scrolling might fail while navigating by certain paterns. Also NVDA tries to report the whole element when the virtual cursor lands on it, no matter how much content the element has. However, the purpose of the quick navigation paterns in browse mode is to provide more efficiency, so there should be a limit of how much content of an element needs to be sent to the synthesizer. Problems identified so far:

Text style navigation

  1. Text Style navigation in MS Word or MS Outlook fails using UIA or the old objectModel while tables and text columns introduce invisible characters and boundaries into the document (#16459, #16408 which led to #16569). See also #16527 (which happens both with UIA enabled and disabled).
  2. Text style navigation fails in Kindle (QT 5 interface) due to unavailable formatting information, this could apply to other interfaces as well, in appmodules where NVDA provides support for browse mode document (see #16559, which led to #16571)
  3. Text style navigation is very slow in MS Word or MS Outlook, especially when NVDA has to construct a huge speech uterance to report the whole text region at once when the carret or the virtual cursor lands on it. (see #16458 and #16408 which also led to #16569).
  4. Text style navigation is very slow when NVDA has to scan a long complex Microsoft Word document until the end and no next text style has been found. See #16546.
  5. Text style navigation throws errors and makes NVDA to be silent when pages in pdf documenta contain only images or when they are empty, see #16407 which led to #16430.
  6. Text style navigation moves the virtual cursor to unexpected invisible characters such as new line characters, tab characters, space characters etc.

Text paragraph navigation

  1. Text paragraph navigation based on textInfo can cause a crash in NVDA when using QT5 interface like in Kindle, see #16558 which led to #16571.
  2. Text paragrpaph navigation based on textInfo can be very sluggish when using UIA in Chromium browsers when no next paragraph was found. See #16436 which led to #16450).
  3. The script for text paragraph navigation based on textInfo moves the virtual cursor to the next or previous text paragraph, and NVDA reports the whole paragraph at once. But when the paragraph contains interactive elements such as links or buttons, NVDA didn't report when these elements start and when they end. See #16143 which led to #16145.

Vertical indent paragraph navigation

  1. Vertical indent navigation based on paragraphs defined in textInfo can cause a crash or make NVDA be very sluggish when using QT5 interface like in Kindle, see #16558 which led to #16571.
  2. Vertical indent navigation based on paragraphs defined in textInfo can be very sluggish on complex websites, see #16382 which led to #16385.

Other problems

  1. Wehn in empty browse mode documents of Microsoft Word with the old objectModel, NVDA was throwing errors while trying to find desired textInfo points instead of reporting "no next xx" or "no previous xx", see #16386 which led to #16388, or #16405 which let to #16569).
  2. NVDA was throwing exceptions errors when trying to move the virtual cursor or carret to textInfo point when the coordinate of the offset is off screen. See #16274 which led to #16276.
  3. NVDA fails in retrieving the correct offset or textInfo of certain points in some applications probably due to external limitations, see e.g. #16570, #16530, #16448).

Describe the solution you'd like

Manual testing

Develop a manual testing template for browse mode documents including:

Describe alternatives you've considered

Automated testing

Develop a robot to perform all steps like in the referenced issues above, maybe the provided test case documents could be used for the robot to perform the tests.

Additional context

Adding new features to the browse mode of NVDA can be tricky and very complex due to the various level of browse mode support in different applications. In order to avoid unexpected issues, such features need extensive testing before being accepted into the core.

Adriani90 commented 1 month ago

cc: @seanbudd, @gerald-hartig