Skip to content

Prevent NVDA from announcing non-landmark <header> and <footer> as "grouping" #18217

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

canacechen9
Copy link

Link to issue number:

Fixes Issue #18186

Summary of the issue:

For the <header> and <footer> elements that are children of the main element, but are unnamed, NVDA is correctly not announcing the role for the elements.
For the header and footer elements that are children of the main element, and are named, NVDA is announcing their role as "grouping".

Description of user facing changes:

NVDA announces <header> and <footer> elements as they are even when they are not ARIA landmarks.

Description of developer facing changes:

Updated findExtraOverlayClasses() in NVDAObjects/IAccessible/chromium to check for <header> and <footer> elements with the role grouping.
If the IA2 attribute container-tag is main, and the element tag is header or footer, NVDA now prevents the default Groupbox class from being applied.

Description of development approach:

Inspected NVDA’s object overlays to find where the incorrect “grouping” label was applied.
Used IA2 attributes like "tag" and "container-tag" to identify structural <headers>/<footers>.
Removed the Groupbox overlay class when the element matched conditions indicating a structural (not ARIA landmark) <header>/<footer>.

Testing strategy:

Used NVDA’s Python Console and Speech Viewer to inspect how headers and footers are announced across several Chromium-based browsers.
Confirmed that unlabeled <header> and <footer> elements no longer produce the misleading “grouping” announcement.
Verified that actual ARIA landmarks and meaningful groupings continue to be read as expected.

Known issues with pull request:

This fix is specific to Chromium objects and may not apply to other rendering engines (like Firefox or EdgeHTML). As not all browers have <sectionheader>/<sectionfooter>.

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

Canace Chen added 3 commits June 4, 2025 06:47
…firmation after applying settings"

This reverts commit cb4b2e9.

reverting accidental commireverting accidental commireverting accidental
committt
@canacechen9 canacechen9 requested a review from a team as a code owner June 4, 2025 20:55
@canacechen9 canacechen9 requested a review from SaschaCowley June 4, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NVDA not announcing expected roledescription for non-landmark header and footer elements
1 participant