[SG-35532] Accessibility: Compare page: Focus lost when selecting a revision
There are no commits yet
Push commits to the source branch or add previously merged commits to review them.
Created by: gitstart-sourcegraph
After opening Popover and selecting revision to compare on the repository comparison page the focus doesn't return to the trigger button.
Popover
which renders Input
with autoFocus
Using a keyboard, select a revision like this:
Notice that focus is lost
This happens in components with PopoverContent with text field + autoFocus inside
Focus should be returned to the trigger that opened the selector (the button)
Unable to cleanly maintain focus on RepoContainer
's Popover since useMemo
gets re-rendered (Input element's autoFocus takes the focus here) when we control open state of Popover
as in other use cases.
Check out the client app preview documentation to learn more.
Push commits to the source branch or add previously merged commits to review them.