# aria-menu Modifier based `{{aria-menu}}` helper based on GitHub top menu keyboard interactions. Functionality is based on a11y focussed keyboard navigation of aria menus and currently only supports vertical-like navigation (but feel free to add horizontal, it should be straight forwards. Features: - `Enter`/`Space` to open the menu and immediately focus the first item - Click to open the menu but _not_ focus the first item - `Escape` to close the menu and focus the original trigger (`aria-labelledby`) - When open, arrow keys will cycle through the menu items, and therefore not leave the menu. - When open, tabbing through the menu items will _not_ cycle but instead return to the natural DOM tabbing flow once the start/end is reached. ARIA attributes are not automatically added for you and you should make use of `role="menu"`, `role="menuitem"`, `role="none"` and `role="separator"` (if required). You should also take care to use the `aria-labelledby` attribute along with a correct `id` attribute on the trigger for the menu. You should also take care to use `aria-haspopup="menu"` and `aria-controls="id"` if required. BUt only if you require the additional disclosure type functionality. These additional aria attributes are not functionally relevant to `{{aria-menu}}` itself. Clicking outside will _not_ close the menu by default, if you require this functionality please combine with our `{{on-outside 'click'}}` modifier (see example). In the example below, the Before Trigger and After Trigger don't do anything, they are only there to demonstrate tabbing functionality with natural DOM tabbing order. ```hbs preview-template
{{#if this.open}} {{/if}}
``` ## Named Arguments | Argument | Type | Default | Description | | --- | --- | --- | --- | | `openEvent` | `Event` | | The Event used to open the menu, if `pointerType` is empty the first menu element is focussed when open | | `onclose` | `function` | | A callback called when the menu is closed |