Skip to content

Fix report details summary in Firefox.#20208

Merged
seanbudd merged 1 commit into
nvaccess:masterfrom
jcsteh:details
May 25, 2026
Merged

Fix report details summary in Firefox.#20208
seanbudd merged 1 commit into
nvaccess:masterfrom
jcsteh:details

Conversation

@jcsteh

@jcsteh jcsteh commented May 25, 2026

Copy link
Copy Markdown
Contributor

Link to issue number:

None.

Summary of the issue:

In focus mode in Mozilla Firefox, when a control which is not editable text is focused (such as a button), pressing NVDA+d to report the details summary reports "no additional details". In contrast, this works in Chromium browsers.

Description of user facing changes:

In Mozilla Firefox, reporting annotation details now works correctly in focus mode on controls which are not editable text.

Description of development approach:

script_reportDetailsSummary had some incorrect assumptions and contained code that was intended to execute but never did (effectively dead code). It assumed that browsers always set the caret even for non-editable controls, but that isn't always true, especially in Firefox. Even though it had code to fall back to using the focus, it returned early before that was ever executed. This change ensures that the fallback code actually runs, as well as fixing the fallback code so that it actually works.

I originally submitted this change as part of #20132, but that had to be reverted. This PR splits out just the details change.

Testing strategy:

In both Firefox and Edge, with this test case:
data:text/html,<button aria-details="d">btn</button><p id="d">d</p><div contenteditable role="textbox">a<span aria-details="d">b</span></div>

  1. Switched to focus mode.
  2. Tabbed to the button.
  3. Pressed NVDA+d to report details. Result: d
  4. Tabbed to the text box.
  5. Pressed home to move to start of line.
  6. Pressed NVDA+d to report details. Result: no additional details
  7. Pressed right arrow to move to "b".
  8. Pressed NVDA+d to report details. Result: d
  9. Switched to browse mode.
  10. Pressed control+home to move to the top (the button).
  11. Pressed NVDA+d to report details. Result: d

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.

@jcsteh jcsteh marked this pull request as ready for review May 25, 2026 00:09
@jcsteh jcsteh requested a review from a team as a code owner May 25, 2026 00:09
@jcsteh jcsteh requested a review from seanbudd May 25, 2026 00:09

@seanbudd seanbudd 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.

Thanks @jcsteh

@seanbudd seanbudd merged commit 7f4b8bf into nvaccess:master May 25, 2026
40 of 42 checks passed
@github-actions github-actions Bot added this to the 2026.3 milestone May 25, 2026
@jcsteh jcsteh deleted the details branch May 25, 2026 02:12
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.

2 participants