Skip to content

No longer sentence nav in VS Code#17652

Merged
SaschaCowley merged 10 commits into
nvaccess:masterfrom
LeonarddeR:sentenceNav
Feb 5, 2025
Merged

No longer sentence nav in VS Code#17652
SaschaCowley merged 10 commits into
nvaccess:masterfrom
LeonarddeR:sentenceNav

Conversation

@LeonarddeR
Copy link
Copy Markdown
Collaborator

@LeonarddeR LeonarddeR commented Jan 24, 2025

Link to issue number:

Fixes #17082

Summary of the issue:

Since we support sentence navigation in IA2 controls, alt+upArrow and alt+downArrow no longer work in Visual Studio Code as NVDA performs sentence navigation.

Description of user facing changes

  1. No longer sentence navigation with alt+up and alt+down in VS Code
  2. Reporting of caret changes for alt+up and alt+down in software such as Visual Studio Code

Description of development approach

  1. Added _supportsSentenceNavigation on EditableText:

    • When None (default), the state is undetermined. The gesture will be send to the OS. When this doesn't result in caret movement, sentence navigation will be tried.to the OS.
    • When True, sentence navigation is explicitly supported and will be performed. When it fails, the gesture is discarded. It will never reach the OS.
    • When False, sentence navigation is explicitly not supported and the gesture is sent to the OS.
  2. Since we're checking caret movement after executing the gesture when sentence nav is False or undetermined, we can report caret changes appropriately. We assume a unit of line in that case.

Testing strategy:

Tested:

  • Sentence navigation works appropriately in Word
  • When pressing alt+up / alt+down arrow in Visual Studio Code or Enterprise, NVDA will report the caret position. Basically, this means that the line that was moved will be repeated.

Known issues with pull request:

None known

Code Review Checklist:

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

@coderabbitai summary

@LeonarddeR LeonarddeR requested a review from a team as a code owner January 24, 2025 20:54
@LeonarddeR LeonarddeR requested a review from seanbudd January 24, 2025 20:54
@LeonarddeR LeonarddeR changed the title NO longer sentence nav in VS Code No longer sentence nav in VS Code Jan 24, 2025
@SaschaCowley SaschaCowley added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Jan 27, 2025
Copy link
Copy Markdown
Member

@SaschaCowley SaschaCowley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of tiny things

Comment thread source/appModules/code.py
Comment thread user_docs/en/changes.md Outdated
@LeonarddeR
Copy link
Copy Markdown
Collaborator Author

Talking about visual studio, I need to test that thoroughly, will do today.

Comment thread source/editableText.py
Comment thread source/editableText.py Outdated
Copy link
Copy Markdown
Member

@SaschaCowley SaschaCowley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @LeonarddeR

@SaschaCowley SaschaCowley merged commit 70b9d82 into nvaccess:master Feb 5, 2025
@github-actions github-actions Bot added this to the 2025.1 milestone Feb 5, 2025
@LeonarddeR LeonarddeR deleted the sentenceNav branch August 23, 2025 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

alt+up / alt+down is not working in Visual Studio Code

4 participants