Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

[SG-36350] Accessibility: Global Menu: Focus isn't correctly captured when menus are opened #36915

Merged
merged 9 commits into from
Jul 4, 2022

Conversation

gitstart-sourcegraph
Copy link
Collaborator

@gitstart-sourcegraph gitstart-sourcegraph commented Jun 9, 2022

Description:

  • Update Popover implementation to stop removing MenuItem from DOM but keep it invisible when menu is not opened.
  • Update DOM and menu styles in :focus-visible state

Refs

SourceGraph Issue
GitStart ticket

Test plan

  • Check on UI to make sure the first menu item is selected by default when menu is opened
  • Keyboard focusing menu item has the common outline style

App preview:

Check out the client app preview documentation to learn more.

Copy link
Collaborator Author

@gitstart-sourcegraph gitstart-sourcegraph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@umpox @valerybugakov

Could you take a look at this PR? We made some hacks on Popover implementation to prevent MenuList from removing from DOM when Popover is hidden.

As far as I can see these changes resolve the issue of losing focus on the first item when Menu is open and MenuList looks great with focus ring.

Just want to have your suggestions before continue fixing test issues

@gitstart-sourcegraph gitstart-sourcegraph added the frontend-platform Issues related to our frontend platform, owned collectively by our frontend crew. label Jun 22, 2022
Copy link
Contributor

@umpox umpox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments, looking further into the forceHidden logic - I think it's OK though

Copy link
Contributor

@umpox umpox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

umpox added a commit that referenced this pull request Jul 6, 2022
…y captured when menus are opened" (#38298)

Revert "[SG-36350] Accessibility: Global `Menu`: Focus isn't correctly captured when menus are opened (#36915)"

This reverts commit d30b22a.
vovakulikov pushed a commit that referenced this pull request Jul 20, 2022
…ed when menus are opened (#36915)

* feat: keep MenuList in DOM when Menu is hidden

Co-authored-by: gitstart-sourcegraph <[email protected]>
vovakulikov pushed a commit that referenced this pull request Jul 20, 2022
…y captured when menus are opened" (#38298)

Revert "[SG-36350] Accessibility: Global `Menu`: Focus isn't correctly captured when menus are opened (#36915)"

This reverts commit d30b22a.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed frontend-platform Issues related to our frontend platform, owned collectively by our frontend crew. gitstart Contract partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Accessibility]: Global <Menu>: Focus isn't moved to first item when menu is opened
4 participants