Skip to content

Fix scrolling to anchor links pointing to the object containing the virtual caret#17676

Merged
seanbudd merged 7 commits into
nvaccess:masterfrom
nvdaes:fixBrowseModeScrollingToStart
Feb 11, 2025
Merged

Fix scrolling to anchor links pointing to the object containing the virtual caret#17676
seanbudd merged 7 commits into
nvaccess:masterfrom
nvdaes:fixBrowseModeScrollingToStart

Conversation

@nvdaes

@nvdaes nvdaes commented Feb 5, 2025

Copy link
Copy Markdown
Collaborator
  • Before scrolling in browse mode, check if the caret is in the first line of the object to be placed
  • Use Sphinx style to describe parameters
  • Update changelog

Link to issue number:

Fixes #17669

Summary of the issue:

When anchor links point to the objec where the virtual caret is placed, NVDA doesn't scroll to the link destination.

Description of user facing changes

NVDA Will scroll to destination of anchor links, even where they point to the object where the virtual caret is placed.

Description of development approach

In the _handleScrollTo function of source/browseMode.py, we check if the caret is placed in the same line as the anchor link destination, instead of checking if it's in the same object.
This has been explained and suggested by @jcsteh in #17669.

Testing strategy: placed in the same object.

Tested with Firefox on Windows 11, and with Chrome and Edge, with and without UIA enabled, using the demo provided in #17669

Known issues with pull request:

None

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

@nvdaes nvdaes changed the title fixBrowseModeScrollingToStart Fix scrolling to anchor links pointing to the object containing the virtual caret Feb 5, 2025
@nvdaes nvdaes marked this pull request as ready for review February 6, 2025 04:47
@nvdaes nvdaes requested a review from a team as a code owner February 6, 2025 04:47
@nvdaes nvdaes requested a review from seanbudd February 6, 2025 04:47
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Feb 10, 2025
Comment thread user_docs/en/changes.md Outdated
Comment thread source/browseMode.py Outdated
Comment thread source/browseMode.py Outdated
nvdaes and others added 2 commits February 11, 2025 06:44
Comment thread source/browseMode.py Outdated
@seanbudd seanbudd merged commit e2d464f into nvaccess:master Feb 11, 2025
@github-actions github-actions Bot added this to the 2025.1 milestone Feb 11, 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.

Links to anchors in web pages are broken if the link points to a parent element

2 participants