Skip to main content
cngx-src documentation

CngxMenuItemKbd

Directivev0.1.0WCAG AA

projects/common/interactive/menu/menu-item-slot.directives.ts

Import#

import { CngxMenuItemKbd } from '@cngx/common/interactive'

Description#

Marker directive for the keyboard-shortcut hint position inside a [cngxMenuItem]. Applies cngx-menu-item__kbd and defaults the host to aria-hidden="true" - the visual hint duplicates the underlying accelerator already wired to the consumer's command, AT readout of the hint would just repeat the label. Typically placed on a <kbd>. Override with [attr.aria-hidden]="null" if the hint is a consumer's primary affordance.

https://cngxjs.github.io/cngx/examples/#/common/interactive/menu/base/action-menu-with-separator

Metadata#

Host#