Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Feature request: add more QuickNav command in browse mode #15982

Closed
mltony opened this issue Dec 29, 2023 · 6 comments
Closed

Feature request: add more QuickNav command in browse mode #15982

mltony opened this issue Dec 29, 2023 · 6 comments

Comments

@mltony
Copy link
Contributor

mltony commented Dec 29, 2023

Is your feature request related to a problem? Please describe.

I propose to add more QuickNav commands to browse mode to allow new types of navigation on web pages. I I will implement this feature request myself if green light is given by NVDA team. Here are new QuickNav commands I would like to implement:

Jump to next/previous text paragraph

  • Here we define text paragraph as paragraph with at least one sentence, that is written with punctuation marks, such as period, question mark, exclamation mark, their full-width CJK counterparts, etc.
  • This allows users to quickly skip over clutter (such as menus, ads, etc) on a wide variety of websites.
  • Another illustration of its utility is finding the beginning of an article on an unfamiliar news web site.
  • This function is a heuristic that doesn't work 100% of the time. There are ads written in complete sentences, and likewise, sometimes in readable text of an article there can be a paragraph without any punctuation marks that will be missed. However, in practice this function works very well most of the time on a wide range of websites and simplifies navigation significantly.
  • This feature has already been implemented in TextNav add-on and by default assigned to Alt+Shift+Up/Down gestures.
  • The add-on is quite stable, it has been around for 5 years and for the last 4 years it's been in maintenance mode and didn't require any fixing besides NVDA compatibility updates.
  • TextNav add-on is quite popular among NVDA users and has been frequently recommended on NVDA mailing list. Recently four users have conteacted me and asked to make it compatible with NVDA v2024.1. Moreover, a quick search reveals that people recommend TextNav in their blogs:
  • In spirit this feature is similar to built-in N QuickNav command "Skip forward past a block of links", which in my understanding was also designed to skip menus on the websites. However in my experience jumping to text paragraph works much better then N QuickNav command as it works more reliably and typically finds exactly the first paragraph of the article.
  • Finally, I believe this command will be quite useful for NVDA beginners, as one of the top tasks they struggle with is trying to make sense of web pages while trying to memorize dozens of keystrokes. With this command they'll be able to quickly and easily start using news articles, which I would think is one of the major use cases for the beginners.
  • I propose to assign by default QuickNav P and Shift+P gestures to this command.

Vertical navigation

  • We define vertical navigation to be jumping to next or previous paragraph, which is vertically aligned visually with the current paragraph, that is their x coordinate is exactly the same.
  • This can be useful on websites that visually display data as a table, but for whatever reason NVDA doesn't see the table. This command can be used to navigate to next/previous cell in the same column.
  • A good example of this is issues list on github - with this feature users will be able to find the first issue and then navigate between issues in the list using vertical navigation with a single keystroke.
  • I propose to assign by default Left bracket [ and Shift+[ gestures to this command.
  • This feature has already been implemented in BrowserNav add-on and by default assigned to NVDA+Control+Up/Down gestures.

Same style navigation

  • This provides command to find to next/previous paragraph written in the same style as current paragraph.
  • Style is defined as font name and other attributes, such as font size, bold, italic, etc.
  • For paragraph that contain text in multiple styles we will only consider the style of the first character.
  • Utility of this function can also be illustrated on issues list on github - as all the issue titles are written in the same style.
  • I propose to assign by default right bracket ] and Shift+] gestures to this command.
  • This feature has already been implemented in BrowserNav add-on and can be triggered by first adjusting BrowserNav rotor by pressing NVDA+O to the value "BrowserNav navigates by font size and same style" and then pressing NVDA+Control+Up/Down keystrokes.

Jump to next/previous items by their roles:

  • Menu item
  • Toggle Button
  • Progress bar
  • math
  • I propose to leave these gestures unassigned by default.

Implementation details

I will implement all the features mentioned above as QuickNav commands in browse mode.
For navigating to next/previous text paratgraph, vertical navigation and style navigation:

  • the implementation will be generic and will work with every browser mode implementation.
  • Logic will be implemented in Python by checking all the paragraphs in the desired direction and checking one-by-one if paragraph satisfies desired criteria.
  • In theory this could be optimized by moving some or all logic to C++ layer, however it appears that Python implementation (that can currently be tested in TextNav and BrowserNav add-ons) is fast enough on the vast majority of websites.
    Navigating to next element by type (menu/progress bar/math) will be only implemented for IA2, since all major browser these days work with IA2 and it's impossible to test MSHTML and UIA implementations. It will be implemented in a manner similar to other QuickNav commands.

Personal note

I I will implement this feature request myself if green light is given by NVDA team. I am on a leave from work until early May 2024, so I will have plenty of free time until then and I promise to promptly fix any issues arising from my PRs. However after May I'll still try to find time to fix issues, but as time permits.

@cary-rowen
Copy link
Contributor

cc @michaelDCurran

Very happy to hear this and I'm really looking forward to these quick navigation features. Today's web pages are complex and diverse, and we need more solutions to flexibly access web pages.

@Brian1Gaff
Copy link

Brian1Gaff commented Dec 29, 2023 via email

@Adriani90
Copy link
Collaborator

For menus / menu items there is #7695 already filled.

For paragraph style navigation, the current proposal seems to complicated in my opinion.

  1. Jump to next / previous text paragraph:
  • If you say the results of your add-on in the wild show that the community likes this much more than the n and shift+n command, why not extending the current behavior with part of your work? As far as I understand the n and shift+n command looks for elements with no semantic role, so you could extend that to include an additional check for punctuation and we don't need an additional key command.
  1. Vertical navigation
  • This is a really really useful feature. I would love to see it in NVDA core. Vertical navigation in general is commonly understood as navigation via up and down arrow keys. So I strongly suggest to maintain this logic in order to not disorientate users. I propose nvda+alt+up and down arrow (desktop) and nvda+shift+alt+up and down arrow (laptop) for this feature.
  1. Same style navigation
  • It is really important to have a feature like this in order to work together with sighted people and understand their navigation paterns as well. It will definitely help to understand a structure of a website in more detail.
  • I would propose p and shift+p for this kind of paragraph navigation. At least form an user perspective it feels more consistent to press p and hear something like "no next paragraph of the same formating style".
  • Paragraphs of the same formating style have often contextual similarities or connections, so as an user i would decide focusing the current paragraph to search for the next one with the same formating style. However, when i leave this paragraph and I land on another one with a different formating style, I might want to go back as fast as possible instead of changing the paragraph style navigation to another style unexpectedly. So i propose something like a style locking feature, like following process:
    a. Focus a paragraph
    b. Press nvda+shift+p --> NVDA reports: paragraph style set as reference
    c. Press p or shift+p --> NVDA navigates to paragraphs of this reference style no matter where I am on the website
    d. Press nvda+shift+p on another paragraph formating style --> NVDA changes the previous style reference to the current paragraph style and maintains this for the p and shift+p navigation
    e. The cache for the paragraph formating style reference doesn't need to be cleaned everytime NVDA restarts or so because the design of the websites will probably not change that often. If the design changes, you can change the paragraph style reference anyway as you wish.
    f. If the user didn't choose any paragraph style reference, p and shift+p command reports "no paragraph style chosen"

@XLTechie
Copy link
Collaborator

XLTechie commented Dec 29, 2023 via email

@mltony
Copy link
Contributor Author

mltony commented Dec 29, 2023

@Adriani90, thanks for your comment;
Re: #7695 - it seems jump to next menu was requested there but never implemented - at least I can' find implementation in current NVDA source code.

  1. Here are some reasons I don't want to update N and Shift+N commands:
    • I never figured out utility of N and Shift+N commands myself, yet there might be users who are used to current behavior. If we change that behavior, those users might complain.
    • Trying to make some sort of hybrid of my proposal and current N command will likely make text paragraph navigation less useful. FOr example because N is looking for text away from hyperlinks and these days news articles might contain plenty of hyperlinks, so if we keep the current logic of N command, we are likely to miss important paragraphs.
  2. Vertical navigation
    • I prefer to have a bracket for vertical navigation to keep it consistent with all the other QuickNav commands - just a single key for finding next element and Shift+key for finding the previous one. However if NVDA devs insist on assigning any other shortcut by default - I am fine with that.
  3. Same style navigation
    • Re keystroke: I would prefer to assign P to text paragraph navigation because text paragraph navigation is by far the most useful feature in this feature request, since it can be used on a wide variety of websites, therefore it deserves a keystroke that is easy to remember. Same style navigation on the other hand is more niche feature for more advanced users.
    • Re style locking feature, : this seems to me overcomplicated:
      • First, when using same style navigation, we will never land on a paragraph with different style by definition.
      • Second, the intended use case is this: on github list of issues page you find the first issue in the list via other means. Then you press ] and Shift+] to navigate between issues in a single keystroke. This is supposed to be much more convenient than current way, where it takes 2-3 Control+Down commands to do the same. Locking paragraph style doesn't help in this use case at all.
      • In general I can see utility of locking to one specifric paragraph. But this more resembles setting a bookmark on a web page, which is already implemented in PlaceMarkers add-on and also in my BrowserNav QuickJump Bookmarks. This idea seems to be orthogonal to same style navigation. It can be proposed to add to NVDA core separately.

@mltony
Copy link
Contributor Author

mltony commented Dec 29, 2023

@Brian1Gaff, I didn't understande your comment about web formatter.
Re UK news websites, I tried TextNav for you with 3 random articles from UK news. On BBC and the Guardian pressing Alt+Shift+Down reads the first paragraph of the story, which is optimal and illustrates the utility of text paragraph navigation:

@nvaccess nvaccess locked and limited conversation to collaborators Jan 1, 2024
@seanbudd seanbudd converted this issue into discussion #15996 Jan 1, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants