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

Ensure tabbing through messages in Windows Mail does not get stuck on the same link #15234

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

michaelDCurran
Copy link
Member

Link to issue number:

Fixes #15211

Summary of the issue:

After merging of pr #14611, tabbing through a message in Windows Mail would cause the caret / focus to get stuck and not move forward to the next element in tab order.
This seems to be because BrowseModeDocument's gainFocus event updates the caret to the position of the element in the document that just gained focus. This is appropriate for web documents where NVDA manages the caret itself, but not for documents where the caret is managed by the application, such as the MS Word mail message viewer.
This has most likely been a problem in some way for a long time, but pr #14611 made it much more obvious as it greatly increased the amount of focus events within documents now spoken / handled.

Description of user facing changes

NVDA no longer gets stuck when tabbing through a message in Windows Mail.

Description of development approach

Suppressing of caret movement in BrowseModeDocument's gainFocus event is controled by a new private variable on the CursorManager class. It is False by default, which does not allow the caret movement to occur. However, for ReviewCursorManager and VirtualBuffer classes, it is True, allowing the existing caret movement behaviour, as in these situations the caret is managed entirely by NVDA.
This then means that in the cases where a CursorManager is used that is not VirtualBuffer or ReviewCursorManager, which is just Microsoft Word browse mode, NVDA will not move the caret itself on gainFocus events, as the application itself will already do this.

Testing strategy:

  • Tab through a message in Windows Mail that has several links. Ensure that NvDA speaks / moves to each link in tern and does not get stuck on the same one.
  • Tab through the google.com web page in Firefox, Chrome and Edge, inclduing Edge via UIA, and ensure that the caret continues to move along with the focus and does not stay where it was last left with the arrow keys.

Known issues with pull request:

This is a very quick fix, that addresses a specific issue for a 2023.2 beta. It may be possible to abstract this wanted behaviour in a cleaner way from the ground up, but this is the smallest code change with the least impact.

Change log entries:

New features
Changes
Bug fixes
For Developers

Code Review Checklist:

  • [x ] Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • Security precautions taken.

…n the same link.

Do this by stopping BrowseModeDocument's event_gainFocus from updating the caret in this situation. It is not necessary as the application moves the caret itself. If NVDA moves the caret due to a focus event, the application can become confused.
Suppressing of caret movement in the gainFocus event is controled by a new private variable on the CursorManager class. It is False by default, which does not allow the caret movement to occur. However, for ReviewCursorManager and VirtualBuffer classes, it is True, allowing the caret movement behaviour, as in these situations the caret is managed entirely by NVDA.
@michaelDCurran michaelDCurran requested a review from a team as a code owner July 31, 2023 22:14
@michaelDCurran michaelDCurran requested review from seanbudd and removed request for a team July 31, 2023 22:14
@michaelDCurran michaelDCurran merged commit 188368f into beta Aug 1, 2023
1 check passed
@michaelDCurran michaelDCurran deleted the i15211 branch August 1, 2023 00:36
@nvaccessAuto nvaccessAuto added this to the 2023.3 milestone Aug 1, 2023
@seanbudd seanbudd modified the milestones: 2023.3, 2023.2 Aug 1, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants