Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The dropdown component's tab and shift+tab handling violate ARIA practices for menuitems #599

Open
brichwin opened this issue Jun 21, 2022 · 1 comment

Comments

@brichwin
Copy link

brichwin commented Jun 21, 2022

Describe the bug

When a menu item in an open IU Rivet dropdown menu has focus, pressing tab and shift+tab is moving to the next/previous menu item, optionally wrapping from the last to first or first to last. This behavior does not follow the ARIA practices for role="menuitem".

Note: Failing to follow ARIA practices reduces a control to "mystery meat navigation" because they do not follow a users established mental model for how a menu/menuitem should behave.

Expected behavior

Under the ARIA practices for keyboard interaction for a menu or menu bar, it states:

Tab and Shift+Tab:
...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: When handling Tab and Shift+Tab when a menuitem has focus, closing the menu is the same as canceling. The focused menu item is not activated.

Relevant context (required)

Steps to reproduce

  1. Navigate to Rivet 1.8.2 Dropdown example.
  2. Move keyboard focus to the "Navigation menu" dropdown button.
  3. Press one of [enter, space, down arrow]
    to open the menu.
  4. In cases where no menuitem has focus (due to a different bug), press the down arrow key to focus a menu item.
  5. Press tab and/or shift+tab as desired. Note that the result is moving between menu items instead of closing the menu.
@brichwin
Copy link
Author

This issue is present in Rivet 1 and Rivet 2. Since the issue was discovered by a Canvas user, please address the Rivet 1 codebase as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant