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
According to the WAI ARIA spec, pressing tab or shift + tab while inside a menu should close the menu and move focus out. In the Headless UI code, tab is captured and prevented if the menu is open
Tab and Shift + Tab:
Move focus into a menubar:
If focus is moving into the menubar for the first time, focus is set on the first menuitem.
If the menubar has previously contained focus, focus is optionally set on the menuitem that last had focus. Otherwise, it is set on the first menuitem that is not disabled.
When focus is on a menuitem in a menu or menubar, move focus out of the menu or menubar, and close all menus and submenus.
Note that Tab and Shift + Tab do not move focus into a menu. Unlike a menubar, a menu is not visually persistent, and authors are responsible for ensuring focus moves to an item inside of a menu when the menu opens.
The text was updated successfully, but these errors were encountered:
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
v1.6.5
What browser are you using?
N/A
Reproduction URL
[keyboard handling in menu component] (
headlessui/packages/@headlessui-react/src/components/menu/menu.tsx
Lines 492 to 495 in 6253aa5
Describe your issue
According to the WAI ARIA spec, pressing
tab
orshift + tab
while inside a menu should close the menu and move focus out. In the Headless UI code, tab is captured and prevented if the menu is openThe text was updated successfully, but these errors were encountered: