Fix report details summary in Firefox.#20208
Merged
Merged
Conversation
seanbudd
approved these changes
May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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>Known issues with pull request:
None.
Code Review Checklist: