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

No longer sentence nav in VS Code #17652

Merged
merged 10 commits into from
Feb 5, 2025
Merged

Conversation

LeonarddeR
Copy link
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
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

source/appModules/code.py Outdated Show resolved Hide resolved
user_docs/en/changes.md Outdated Show resolved Hide resolved
@LeonarddeR
Copy link
Collaborator Author

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

source/editableText.py Show resolved Hide resolved
source/editableText.py Outdated Show resolved Hide resolved
Copy link
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
5 checks passed
@github-actions github-actions bot added this to the 2025.1 milestone Feb 5, 2025
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