Skip to content

Support quick nav to headings 7 to 9 in browse mode #18015

Merged
seanbudd merged 9 commits into
nvaccess:masterfrom
CyrilleB79:extHeadings
May 13, 2025
Merged

Support quick nav to headings 7 to 9 in browse mode #18015
seanbudd merged 9 commits into
nvaccess:masterfrom
CyrilleB79:extHeadings

Conversation

@CyrilleB79

@CyrilleB79 CyrilleB79 commented Apr 25, 2025

Copy link
Copy Markdown
Contributor

Link to issue number:

Fixes #18014

Summary of the issue:

In MS Word, heading levels can go from 1 to 9 but only quick nav keys for 1 to 6 are available (as on the web).

Description of user facing changes

Quick navigation keys 1 to 9 are now available in any browsable document. In MS Word, headings 1 to 9 are supported natively. In HTML, only H1 to H6 are supported, but level 7 to 9 can be implemented throught aria-level.

Description of development approach

  • Created a function to add heading scripts to a class, taking a level range as parameter
  • Used this function to factorize heading 1 to 9 quick nav keys for browseable documents.

Testing strategy:

  • Tested in Word and Outlook, UIA and legacy
  • Tested in PDF (Adobe); 1 to 6 only supported.
  • Tested on the web (Chrome)
  • Tested MSHTML (ui.browseableMessage); aria-level not suported.

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

@CyrilleB79 CyrilleB79 marked this pull request as ready for review April 25, 2025 15:38
@CyrilleB79 CyrilleB79 requested review from a team as code owners April 25, 2025 15:38
@LeonarddeR

Copy link
Copy Markdown
Collaborator

With aria, you can definitely set higher heading levels:
<p role="heading" aria-level="88">test</p>

@CyrilleB79

Copy link
Copy Markdown
Contributor Author

With aria, you can definitely set higher heading levels: <p role="heading" aria-level="88">test</p>

OK. Thanks for this useful information.
In this case, I will support headings 1 to 9 for any browse mode document, what will also make the code simpler.

@CyrilleB79 CyrilleB79 marked this pull request as draft April 27, 2025 20:21
@CyrilleB79 CyrilleB79 marked this pull request as ready for review April 28, 2025 15:08
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Apr 28, 2025
Comment thread source/browseMode.py
Comment thread source/browseMode.py Outdated
Comment thread source/browseMode.py
Comment thread source/browseMode.py
Comment thread source/browseMode.py
Comment thread user_docs/en/changes.md Outdated
@SaschaCowley SaschaCowley changed the title Support quick nav to headings 7 to 9 in MS Word Support quick nav to headings 7 to 9 in browse mode Apr 29, 2025
@SaschaCowley SaschaCowley marked this pull request as draft May 2, 2025 02:21
CyrilleB79 and others added 2 commits May 5, 2025 08:11
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
@CyrilleB79 CyrilleB79 marked this pull request as ready for review May 5, 2025 06:16
@CyrilleB79

Copy link
Copy Markdown
Contributor Author

@SaschaCowley I have accepted almost all of your changes. I have just decided to log an error rather than a debug message when the heading level to be created is not between 1 to 9. And the change log item still needs to be discussed.

You can have a look again; thanks.

Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>

@Qchristensen Qchristensen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reads well, great work everyone

@seanbudd seanbudd merged commit 48a5404 into nvaccess:master May 13, 2025
15 checks passed
@github-actions github-actions Bot added this to the 2025.2 milestone May 13, 2025
@CyrilleB79 CyrilleB79 deleted the extHeadings branch May 16, 2025 08:51
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.

Ability to navigate to headings at levels 7, 8 and 9 in MS Word

5 participants