-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 9.5.1
-
Component/s: Accessibility
-
Severity 3 - Minor
Issue Summary
The focus does not correctly move onto the newly added content when the page is dynamically updated.
Steps to Reproduce
- Open the home page and activate the "Project" link in the header.
- Select any of the projects from the main content area.
- Select any of the repositories.
- Navigate onto the "Pull request" link in the side navigation and activate it.
- Activate any of the links from the "Summary" column in the data table.
- Navigate onto the "Contribution guidelines" button in the "Overview" tab and activate it".
- Observe that a new content gets added on the page.
- Observe that the focus does not move onto the beginning of the newly added content.
- Observe that the focus inappropriately moves at the last interactive element of the modal dialog.
Screen Recording
Screen Recording 2025-03-03 at 8.45.03 AM.mov![]()
Actual Results
When the "Contribution guidelines" button is activated, a new modal dialog gets opened on the page. However, the focus inappropriately moves onto the last interactive element of the dialog instead of moving to the beginning of the newly added content. This illogical focus order might make the page difficult to understand for the keyboard and screen reader users.
Expected Results
Make sure that the focus is managed appropriately when the page is updated.
The best possible solution in this scenario would be to move the programmatic focus onto the heading of the newly updated content when the users activate the button. This can be done with tabindex=”-1” or the “focus” method. This will allow elements to receive programmatic focus when they are not naturally in the focus order.
If this is not possible, then make sure that the focus goes onto the first interactive element of the newly updated content.
For more information, please refer “https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus”
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
Environment
MacBook Pro (16-inch, 2021)
macOs Sonoma 14.3.1
Chrome - Version 119.0.6045.123 (Official Build) (64-bit)
Firefox- Version 93.0 (32-bit)
Safari- Version 17.3.1 (19617.2.4.11.12)
JAWS- Version 2023
NVDA- Version 2024.3
Voiceover - Version Latest