Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Allow creating Button with attached Menu #877

@jurokapsiar

Description

@jurokapsiar

Feature Request

Allow creating Button with attached Menu. The functionality should follow ARIA Navigation Menu example with regards to the rendered DOM structure and keyboard handling. The only difference is that the menu should not be opened on hover, but on click.

Requirements

  • menu open on enter/space and focus goes to first item in menu
    -(Optional) Down Arrow: opens the menu and moves focus to the first menu item.
    -(Optional) Up Arrow: opens the menu and moves focus to the last menu item.
  • menu is closed on esc key and focus goes back to the button
  • if he press TAB key, focus goes naturally to next focusable element after menu and menu is closed
  • if he press shift+tab key focus goes naturally to previous focusable element and menu is closed.
  • able to do position of menu the same as for popup

DOM structure

<div class="menu_button">
  <button id="menubutton"
          aria-haspopup="true"
          aria-controls="menu2">
    WAI-ARIA Quick Links
  </button>
   <!-- ul/li/a structure rendered by Menu component -->
  <ul id="menu2"
      role="menu"
      aria-labelledby="menubutton">
    <li role="none">
      <a role="menuitem" href="https://www.w3.org/">
        W3C Home Page
      </a>
    </li>

Metadata

Metadata

Assignees

No one assigned

    Labels

    vstsPaired with ticket in vsts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions