Repository navigation
fix: make the side nav's user menu reachable from the keyboard - #3851
Draft
kaustubhdgr8 wants to merge 1 commit into
Draft
kaustubhdgr8 wants to merge 1 commit into
kaustubhdgr8 wants to merge 1 commit into
Conversation
|
@kaustubhdgr8 is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 8953cdd The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The user menu at the bottom of the side nav (avatar, name, team) opens User preferences, Team settings and Log out. Its
Menu.Targetwas a MantinePaper, which renders a<div>: it has notabindex, so Tab skips it, and Enter and Space do nothing. Keyboard users could not open the menu at all, in either nav state. Screen readers did not expose it as a control either.Paperas a<button type="button">(component="button"), so it is focusable and opens with Enter and Space through Mantine'sMenu..userMenugets the rules a<button>needs to look like the old<div>:display: block, the width the block used to fill, and resets for the browser's border, font, colour and centred text.:focus-visibleuses the same highlight as hover, as the nav links do.VisuallyHidden, so it is named "Jane Doe" rather than only "JD". Expanded, its visible text already names it.AppNavUserMenu.test.tsx: in both nav states, Tab focuses the trigger and Enter opens the menu ("User preferences" appears). Both fail onmain("Unable to find an accessible element with the role "button" and name/Jane Doe/").@hyperdx/apppatch.Screenshots or video
No visual change. Screenshots of the full nav (1280x720,
yarn app:dev:local, dev overlays hidden) onmainand on this branch are pixel-identical in light and dark, expanded and collapsed, apart from the Help icon's twinkling sparkle, which is mid-animation in each shot. The trigger's box is the same (expanded 234x36 at 8,676; collapsed 30x30 at 10,676).main)<div>,tabIndex-1, not in the accessibility tree as a control<button>,tabIndex0, button named "U Local mode" (local mode)How to reproduce
Starting point:
yarn app:dev:local+ Connect to Demo Server.On
main:data-testid="user-menu-trigger"is a<div>with notabindex.On this branch:
How to test on Vercel preview
Preview routes: /search
Steps:
References