#108964File reference selector: Focus after closing info dialog is suboptimal
Description
When the info dialog opened from within the file reference selector dialog is closed, the keyboard focus jumps to the top of the page instead of returning to the triggering button inside the file reference selector. This is problematic for accessibility and usability.
Steps to Reproduce
- Open a backend content element with a file field (e.g. image).
- Open the file reference selector dialog.
- In the file reference selector, open the info/details dialog for a file via the corresponding button.
- Close the info dialog using the “Close” button or ESC.
- Observe where the keyboard focus is placed.
Current Behavior
After closing the info dialog, focus is moved to the top of the page or outside of the file reference selector dialog.
Expected Behavior
After closing the info dialog, focus is returned to the button in the file reference selector dialog that was used to open the info dialog.
Impact
- Keyboard and screen reader users lose their current context.
- Additional tabbing is required to return to the previous position.
- Does not follow accessibility best practices for focus management in modal dialogs (e.g. WCAG 2.4.3, 2.4.7).
Recommended Solution
- Before opening the info dialog, store the currently focused element (trigger button).
- On closing the info dialog, programmatically move focus back to that stored element (triggerElement.focus()).
- Ensure all close variants (Close button, ESC, overlay click – if supported) use the same focus-return logic.
Definition of Done
- After closing the info dialog, focus reliably returns to the triggering button inside the file reference selector dialog.
- Behavior is consistent across all supported browsers.
- Manual keyboard testing (open/close info dialog using only the keyboard) shows no unexpected focus jumps.
- Other backend modal dialogs keep their correct focus behavior (no regressions).
Acceptance Criteria
- Closing the info dialog via the “Close” button returns focus to the triggering button in the file reference selector dialog.
Reviews 2
Related issues 1
Files 1
History 26
-
Christian Jung changed Related to #108965 <span data-processor="relativetime" data-value="2026-02-12T15:05:54+00:00" > 02/12/26, 15:05 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 96969 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-22T11:26:58+00:00" > 10/22/26, 11:26 </span> -
Gerrit Code Review pushed patch set 3 for main to change 96969 <span data-processor="relativetime" data-value="2026-10-24T20:14:35+00:00" > 10/24/26, 20:14 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 96969 <span data-processor="relativetime" data-value="2026-10-28T20:39:32+00:00" > 10/28/26, 20:39 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 97340 <span data-processor="relativetime" data-value="2026-11-04T14:19:52+00:00" > 11/04/26, 14:19 </span>
-
Oliver Bartsch commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-11-04T14:25:18+00:00" > 11/04/26, 14:25 </span>
Applied in changeset commit:e4d5daedeb47fefa5c3171fcd21d5fff7c4f0c0c.