Duration
19 min
Access
Pro
Transcript
Available

We are creating an accessible popup menu for a web application. It covers various concepts, including handling keyboard events, creating a new dropdown component for reuse, using arrow keys to navigate through buttons, using the Tab key to close the menu and go to the next item in the tab order, using the Escape key to close the menu and focus on the button that closes it, using the aria-expanded attribute to communicate whether the menu is open or closed, and the difference between the tab index values of 0 and -1.

Think about:

  • Why tabindex -1?
  • Why would you use arrows versus tab key to navigate through the dropdown?