Skip to main content
cngx-src documentation

createW3CMenuStrategy

Functioncommon/interactive/menu

projects/common/interactive/menu/menu-nav-strategy.ts

Description#

Default W3C APG menu keyboard policy:

  • ArrowRight on a submenu parent that is currently closed → open-submenu. On an already-open submenu or a leaf item → noop (item-level navigation inside the open submenu is owned by the submenu's own active-descendant).
  • ArrowLeft when a submenu is open at the current level → close-submenu. Otherwise → move-to-parent (an enclosing menubar interprets that; a standalone menu trigger treats it as noop).

Signature#

createW3CMenuStrategy()

Returns#

CngxMenuNavStrategy