PROPTYPEDEFAULT
valuestringSelection value surfaced via `e.detail.value` on the bubbled
`onMenuItemSelect` event. Use this to give the consumer an opaque
identifier for the item (e.g. `value="edit"`) so they don't have to
pattern-match on label or DOM ref.
Note on labeling: the **default slot supplies the visible AND
accessible name** for text items — `<al-menu-item value="edit">Edit profile</al-menu-item>`
is sufficient. The `label` attribute is only required for
icon-only menu items where there is no visible text. Setting both
`label="Edit"` and the slot to "Edit" produces a duplicate
accessible name.—
hrefstringThe optional menu link URL—
target'_blank' | '_self' | '_parent' | '_top'Target attribute for the menu link (i.e. set to _blank to open in new tab)—
linkTitlestringTitle attribute
- Optional title for a11y
- If a link opens a new window or performs an action, use the title attribute to provide a tooltip with additional information.—
isHeaderbooleanisHeader property
- **true** Applies the header treatment to the menu item—
isExpandableHeaderbooleanLegacy compatibility property; it does not control the disclosure button.—
isExpandedbooleanisExpanded property
- **true** Applies the expanded treatment to a Header item
- **false** Applies the collapsed treatment to a Header item—
isSelectedbooleanSelected attribute
- Changes the component's treatment to represent a selected state—
isFocusedbooleanCurrent attribute
- Changes the component's treatment to represent a focused state—
isDisabledbooleanDisabled attribute
- Changes the component's treatment to represent a disabled state—
isHiddenbooleanIs hidden property
- Is set on child menu items based on their Header's expanded state
- **true** Hide the item
- **false** Show the itemfalse
groupIdstringGroup id property
- Dynamically set by the Menu parent component
- Used to associate menu group headers and group items—
idxnumberIndex property
- Dynamically set by the Menu parent component
- Used to track and set focus with keyboard navigation—
indentationnumberIndentation
- Dynamically set by the menu parent component
- Adds padding to a menu item to left-align its text with that of its Header0
labelstringLabel attribute
- Sets the ariaLabel for A11y—
ariaControlsstringAria controls
- Associates an Expandable Header's control with the items in that group
- **Not rendered as an attribute.** The ids `<al-menu>` collects here belong
to `<al-menu-item>` hosts in the *document*, while the expand control
lives inside this component's shadow root, and an IDREF cannot cross a
shadow boundary — every value was reported invalid
(axe `aria-valid-attr-value`). The disclosure relationship is carried by
`aria-expanded` on the control, which needs no IDREF. The property is
kept because it is public API and records the grouping.
- Defaults to `''`: it used to be `undefined`, and `undefined += ' id'`
produced the literal id list `"undefined group-x-item-1"`.''