User Tools

Site Tools


accessibility:menus

This is an old revision of the document!


Navigation Menus

Top-level menu items should be <a> links if they go directly to another page or route, and <button> if they contain a dropdown or trigger some other JavaScript-based action. The top level link text and caret indicator should be part of the same button, not separated. The button should use the aria-expanded attribute rather than aria-haspopup.

Within a dropdown menu, the containing element should have the [ngbDropdownMenu] directive, and the individual items should have the [ngbDropdownItem] directive. This allows the user to navigate within a submenu using the up and down arrow keys as well as the tab key. See the ng-bootstrap documentation.

Further reading on navigation menus

accessibility/menus.1691444516.txt.gz · Last modified: 2023/08/07 17:41 by scl

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.