No longer sentence nav in VS Code (#17652)
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:
- [x] Sentence navigation works appropriately in Word
- [x] 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