dropdown menu
A list of choices that opens from a button and closes after one is picked or when focus leaves it.
In more detail
An accessible menu uses role menu with menuitem children, moves focus with the arrow keys, closes on Escape and returns focus to its button. Clicking outside the menu should also close it.
Related terms
- keyboard navigation — Using a page entirely with the keyboard: Tab to move between controls, Enter and Space to activate, arrow keys inside widgets, Escape to close.
- ARIA — The W3C standard of HTML attributes, such as role and aria-expanded, that tell assistive technology what a custom widget is and what state it is in.
- keyboard focus — The single element on the page that currently receives keyboard input, such as the text box you are typing into.
Taught in
- useLayoutEffect vs useEffect: Painting And Synchronous Reads — React 19 & Modern Component Architecture
- Compound Components: Inversion of Control with Context — React 19 & Modern Component Architecture
- Accessible Headless Primitives: ARIA, Focus, And Keyboard — React 19 & Modern Component Architecture