Skip to content

fix(core): make the TaskBar's Start menu usable from the keyboard - #614

Merged
ggdaltoso merged 1 commit into
React95:masterfrom
parthchilwerwar:fix/taskbar-start-menu-keyboard
Nov 12, 2026
Merged

ggdaltoso merged 1 commit into
React95:masterfrom
parthchilwerwar:fix/taskbar-start-menu-keyboard

Conversation

@parthchilwerwar

Copy link
Copy Markdown
Contributor

The Start button opens a List menu, and since #600 that menu can be fully driven from the keyboard, but there was no keyboard way into it. Enter on Start showed the menu while the focus stayed on Start, Esc did nothing, and since the menu came before Start in the DOM, Tab from Start went straight to the window buttons. Screen readers weren't told that Start opens a menu either.

This makes Start a menu button:

  • aria-haspopup="menu" and aria-expanded on Start
  • Enter, Space and ↓ open the menu with the focus on its first item, ↑ opens it on the last one
  • Esc in the menu closes it and gives the focus back to Start. In a submenu, Esc still closes just the submenu first: List already calls preventDefault there, and the top menu leaves Esc to whatever opened it
  • tabbing out of the menu closes it

The menu now renders after Start, so Tab goes from Start into the menu and then on to the window buttons. It's absolutely positioned, so it shows in the same place. I logged its rect in the story test with and without this change and it's identical.

Mouse use doesn't change: a click on Start toggles the menu without moving the focus, and choosing an item closes it.

One thing I left as it is: Shift+Tab from the menu back to Start keeps the menu open. Closing it on that blur would fight with a click on Start (the blur closes it, then the click opens it again). From Start, Enter or Esc closes it.

Testing

  • Added the keyboard steps to the TaskBar > Simple play function. They fail on master (no aria-haspopup, and after Enter the first item doesn't have the focus) and pass with this change.
  • TaskBar, List, Modal and useModal story tests pass, plus lint, tsc and the unit tests from the git hooks.
  • With a11y.test set to 'error' locally, the only violation in TaskBar > Simple is the inactive title contrast that chore(storybook): fail story tests on accessibility violations #613 exempts, same as on master.

Start is now a menu button. It has aria-haspopup and aria-expanded,
Enter, Space and ↓ open the menu on its first item, ↑ on its last, and
Esc closes it and gives the focus back to Start. Tabbing out of the
menu closes it too.

The menu now comes after Start in the DOM, so Tab goes from Start into
the menu and then on to the window buttons. It still shows in the same
place.
Copilot AI balanced review requested due to automatic review settings November 11, 2026 17:10
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@ggdaltoso

ggdaltoso commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Thanks for this, @parthchilwerwar!

After #600 the menu worked from the keyboard but you couldn't get into it, and this closes that gap. Moving the menu after Start in the DOM also means Tab finally goes where you'd expect.

I tested it in Storybook. Enter, Space and the arrows open the menu on the right item, and Esc puts the focus back on Start.

While testing I noticed the TaskBar buttons have outline: none, so you can't see when Start has the focus. That was there before this PR, so I opened #615 for it, and it doesn't need to block this one.

@nx-cloud

nx-cloud Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 85a20cb

Command Status Duration Result
nx affected -t lint,test,build,test-storybook,b... ✅ Succeeded 1m 7s View ↗
nx-cloud record -- yarn nx format:check ✅ Succeeded 1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-11-12 12:32:26 UTC

@ggdaltoso
ggdaltoso merged commit 60f8c61 into React95:master Nov 12, 2026
8 checks passed
@parthchilwerwar

Copy link
Copy Markdown
Contributor Author

Thanks for testing it and merging, @ggdaltoso!

Good catch on the outline. I was so focused on getting into the menu that I missed you can't even see when Start has the focus. I saw #616 already picks up #615 and you're reviewing it, so I'll leave that one to them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants