wai-tutorials icon indicating copy to clipboard operation
wai-tutorials copied to clipboard

Application Menu Example Tab Index Broken

Open enqueue opened this issue 2 years ago • 2 comments

Summary

In the example implementation of the application menu, using Shift-Tab focuses the first menu item instead of the first previous focusable element outside the application menu.

Steps to reproduce

  1. Open https://www.w3.org/WAI/tutorials/menus/application-menus-code/
  2. Use tab to focus the "File" menu item
  3. Use right cursor to focus the "Edit" menu item
  4. Use Shift-tab

Expected behavior

Focus is on the "Menus Tutorial" link element.

This expectation is based on the description of the keyboard behavior on the Application Menus page (Key mapping for top-level menu items), where it says that Shift-tab should select the previous focusable element outside of the menu.

Actual behavior

Focus is on the "File" menu item.

wai-appmenu

Environment

I am using Mozilla Firefox 100 on Linux, without any extensions that would interfere with focus handling.

enqueue avatar May 09 '22 12:05 enqueue

The problem occurs in all browsers and operating systems. The cause is that the tabindex=0 always remains on the first menu item and is not moved with the focus

JAWS-test avatar May 10 '22 03:05 JAWS-test

Thanks, that is indeed a bug.

yatil avatar Jul 14 '22 13:07 yatil