{/* Copyright 2020 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License. */}
# MenuTrigger Accessibility Specification
## Overview
A `MenuTrigger` is a component that surrounds a trigger `Button` and either a `Menu` or a `Popover` that expands to display when the `Button` is clicked.
The trigger `Button` is often styled as a typical push button with a downward pointing arrow or triangle to hint that activating the button will display a menu.
## WAI-ARIA Design Pattern
The `MenuTrigger` component implements the [Menu Button design pattern, per WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton).
### Keyboard Interaction
With focus on the button:
- Enter: opens the menu and places focus on the first menu item.
- Space: Opens the menu and places focus on the first menu item.
- (Optional) ArrowDown: opens the menu and moves focus to the first menu item.
- (Optional) ArrowUp: opens the menu and moves focus to the last menu item. Note that v2, does not implement this behavior.
The keyboard behaviors needed after the menu is open are described in the [Menu Accessibility spec](Menu.mdx).
Note, that it is important for the `Button` component to have `type` equal to `button` so clicking a `MenuTrigger` button within a `form` does not submit the form.
### Roles, States, and Properties
- The element that opens the menu has role [`button`](https://www.w3.org/TR/wai-aria-1.1/#button). With a `