menuitem-name-present

Menu items have an accessible name

automaticWCAG 4.1.2 (A)confidence: highseverity: seriousrobust

Checks that menu items (role="menuitem*", including checkbox/radio variants) expose a non-empty accessible name.

Applies to. Applies to elements carrying role="menuitem", role="menuitemcheckbox" or role="menuitemradio" (the attribute must name one of those roles alone, not a fallback list) that are included in the accessibility tree.

Expectation. The element has a non-empty accessible name from aria-label, from an aria-labelledby that resolves to non-empty text, from title, or, all three roles being name-from-content, from its own subtree text, where a descendant's own name (an <img alt>, aria-label or title) counts as that descendant's contribution rather than only its text nodes.

Examples

pass
<div role="menuitem" tabindex="0">Cut</div>

Visible text content is a valid name source for role="menuitem".

fail
<div role="menuitem" tabindex="0"></div>

No name and no content.

View source