Skip to content

Add touch based web element navigation in browse mode#19414

Merged
SaschaCowley merged 33 commits intonvaccess:masterfrom
kefaslungu:webmode
Mar 31, 2026
Merged

Add touch based web element navigation in browse mode#19414
SaschaCowley merged 33 commits intonvaccess:masterfrom
kefaslungu:webmode

Conversation

@kefaslungu
Copy link
Copy Markdown
Contributor

@kefaslungu kefaslungu commented Jan 3, 2026

Link to issue number:

Closes #3424

Summary of the issue:

As noted in the above issue, touch users do not have a dedicated way to perform browse mode style navigation of web content using touch gestures.

Description of user facing changes:

A new Web touch navigation mode has been introduced. When active, touch gestures allow users to navigate common web elements such as links, buttons, headings, form fields, landmarks, and other structural elements in browse mode documents.
This enables touch based navigation that mirrors existing browse mode navigation commands.
When browse mode is exited, the Web touch mode is automatically removed and touch navigation returns to its previous behavior.

Description of developer facing changes:

New touch gesture scripts have been added to invoke existing browse mode navigation commands. These scripts reuse the existing BrowseModeTreeInterceptor logic rather than introducing new navigation implementations.
Supporting logic has been added to track the active browse mode context and route touch gestures to the appropriate browse mode commands when available.

Description of development approach:

This change was implemented by subscribing to browse mode state change notifications and using them as the authoritative signal for enabling and disabling web specific touch behavior. The active browse mode tree interceptor is cached on activation and cleared on deactivation.

Testing strategy:

Manual testing was performed using touch navigation in multiple browse mode documents across supported web browsers. Testing verified:

  • Automatic activation of Web touch mode when entering browse mode
  • Correct removal of Web touch mode when leaving browse mode
  • Correct navigation between web elements using touch gestures
  • No appearance of Web touch mode in non browse mode contexts

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.

kefaslungu and others added 5 commits January 3, 2026 15:35
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Jan 6, 2026
@seanbudd
Copy link
Copy Markdown
Member

seanbudd commented Feb 3, 2026

@kefaslungu - do you intend to finish this?

@kefaslungu kefaslungu marked this pull request as ready for review February 3, 2026 08:41
@kefaslungu kefaslungu requested review from a team as code owners February 3, 2026 08:41
@kefaslungu
Copy link
Copy Markdown
Contributor Author

Hi @seanbudd ,

It is now ready for review. I've decided to send another PR for the remaining features discussed at #3424

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.

Welcome @kefaslungu! Thanks for opening your first PR for NVDA!

There are a few things in here that have me concerned, but overall I really like the direction you're going.

@josephsl
Copy link
Copy Markdown
Contributor

josephsl commented Feb 7, 2026

Hi,

I am the original creator of the parts of the code reviewed in this pull request discussion. Kefas has adopted it to NVDA Core expectations and structure.

The comment on implementation in the global commands module can be explained by the fact that the code and the idea behind it comes from an add-on (Enhanced Touch Gestures). The add-on used a global plugin class to house list of navigable elements, browse mode script calls, and the gesture to cycle between web elements. Our (Kefas and I) plan is to adopt Enhanced Touch Gestures add-on based on the pull request code structure and make changes based on review comments, with the end goal of removing web mode from the add-on in favor of NVDA Core version.

Thanks for reviewing Kefas' pull request.

… element registration and settings

Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
@kefaslungu
Copy link
Copy Markdown
Contributor Author

Hi all,

I've made some changes as follows:

  • Moved all web touch navigation scripts from GlobalCommands into BrowseModeTreeInterceptor, with category=inputCore.SCRCAT_BROWSEMODE and translatable descriptions.
  • Dynamic element registration: addQuickNav now accepts includeInWebTouch=True and auto-registers each element type into _webTouchNavRegistry. _webBrowseElements is built from this registry after all qn() calls, so future NVDA element types appear automatically with no manual updates. Heading sub-types (heading1–9) are excluded via includeInWebTouch=False.
  • Settings: Added a sub-section to BrowseModePanel (one per element type) to control which types appear when cycling.

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.

Heading in the right direction, but still needs some work. Good progress though :)

@SaschaCowley SaschaCowley marked this pull request as draft February 20, 2026 08:13
kefaslungu and others added 3 commits February 23, 2026 02:02
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
…mode

# Conflicts:
#	source/gui/settingsDialogs.py
@kefaslungu
Copy link
Copy Markdown
Contributor Author

Hi @SaschaCowley,

Thanks for the detailed review! I've addressed all the feedback as follows:

  • Replaced all the 37 boolean config keys with a single string_list.
  • Replaced individual checkboxes with CustomCheckListBox.
  • Added explicit translatable touchLabel to every addQuickNav call, removing the camelCase derivation.
  • Heading levels (1–9) are now registered with their own touch labels rather than excluded.
  • _webBrowseCurrentType is now an instance attribute.
  • Renamed includeInWebTouch → availableInWebTouch.

All that is left now is documentation, but I'll do that as soon as the code is approved.

Cheers!

@kefaslungu kefaslungu marked this pull request as ready for review February 23, 2026 01:20
@kefaslungu kefaslungu marked this pull request as ready for review March 10, 2026 03:45
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
@seanbudd seanbudd requested a review from SaschaCowley March 11, 2026 00:15
@seanbudd seanbudd removed the blocked/needs-product-decision A product decision needs to be made. Decisions about NVDA UX or supported use-cases. label Mar 11, 2026
@kefaslungu
Copy link
Copy Markdown
Contributor Author

Hi @SaschaCowley any updates for me?

Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
Copy link
Copy Markdown
Member

@Qchristensen Qchristensen left a comment

Choose a reason for hiding this comment

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

Looks good, I did make a couple of suggestions

Copy link
Copy Markdown
Member

@Qchristensen Qchristensen left a comment

Choose a reason for hiding this comment

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

Reads well, thank you.

@SaschaCowley SaschaCowley enabled auto-merge (squash) March 31, 2026 02:59
@SaschaCowley SaschaCowley merged commit 58e5802 into nvaccess:master Mar 31, 2026
41 checks passed
@github-actions github-actions bot added this to the 2026.2 milestone Mar 31, 2026
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.

Touch gestures: a way to browse the web via elements using touch gestures

7 participants