You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When any modals are open on the page, the user's focus should be locked to that element.
Currently it is possible to exit the modal focus when the modal is open and the user enters the page again using keyboard navigation starting from the address bar. See the reproduction instructions and the related video.
To Reproduce
Log out if currently logged in
Go to a proposals component with proposal creation enabled
Click the "New proposal" button to open the login modal
Put the cursor focus to the browser's address bar
Using the TAB key on the keyboard, re-enter the content of the page
See once you reach the document, focus is outside of the modal that is open on top of the page
Repeat the same experiment but by using SHIFT+TAB to re-enter the document from the bottom
Note that this works if the modal remains the last element on the page but it has to be checked if this is always the case
Expected behavior
The focus should remain within the topmost opened modal element at all times.
This is the reason the focus guard was implemented in the first place.
Describe the bug
When any modals are open on the page, the user's focus should be locked to that element.
Currently it is possible to exit the modal focus when the modal is open and the user enters the page again using keyboard navigation starting from the address bar. See the reproduction instructions and the related video.
To Reproduce
TABkey on the keyboard, re-enter the content of the pageSHIFT+TABto re-enter the document from the bottomExpected behavior
The focus should remain within the topmost opened modal element at all times.
This is the reason the focus guard was implemented in the first place.
Screenshots
decidim-redesign-focusguard.mp4
Stacktrace
No response
Extra data
Additional context
Originally reported at:
#9760 (comment)