Draft: Move focus on the original element on drawer close
What does this MR do and why?
Currently, when the drawer is closed, the focus is lost from the window. This results in confusion for a accessible user who is navigating using keyboard.
This MR moves focus to the source element when the drawer is closed. The impacted areas are:
- Issue list
- Work item list
- Boards
- Child items list on work item detail
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
- Closes #501085
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Scenario | Before | After |
---|---|---|
Issue list | ||
Work items list | ||
Boards | ||
Child items widget |
How to set up and validate locally
Prerequisites:
- Enable FF
issues_list_drawer
- Enable FF
work_items_view_preference
- Enable FF
epics_list_drawer
Steps to verify on the issue list:
- Login with any user
- Go to Project/Group > Issues or Group > Epics
- Open or create an Issue/Epic
- Navigate to the link of the item in the list using key board
- Press enter
- The focus will be on the first element of the drawer.
- Navigate to the close drawer button
- Press enter
- Verify the focus retains to the original link
Steps to verify on the boards:
- Login with any user
- Go to Project/Group > Issue boards or Group > Epics boards
- Navigate to any of the link of the item on the boards list using key board
- Press enter
- The focus will be on the first element of the drawer.
- Navigate to the close drawer button
- Press enter
- Verify the focus retains to the original link
Steps to verify on the child items widget:
- Login with any user
- Go to detail page of any Issue/Epic/Objective
- Navigate to any of the link of the item in the child item widget using key board
- Press enter
- The focus will be on the first element of the drawer.
- Navigate to the close drawer button
- Press enter
- Verify the focus retains to the original link
Related to #465853
Edited by Rajan Mistry