Menuitem has non-empty accessible name
| Field | Value |
|---|---|
| Rule code | Menuitem_Name_Missing |
| WCAG conformance level | A |
| WCAG success criterion | 4.1.2 Name, Role, Value |
| Must be fixed at source | No |
Description
Menu item defines a command or item that the user can invoke from a popup menu. These elements require an accessible name to be provided so that they can appear as usable options to users. We detected a menu item missing an accessible name via inner text content, title attributes or ARIA labeling mechanisms. Without an accessible name, the purpose and information conveyed through the menu item may not be announced accessibly with assistive technologies.
How to fix
To avoid missing accessible names on menuitem elements, ensure they have visible text content, or assign an accessible name using the aria-label, aria-labelledby, or title attributes. For example: button role=menuitem aria-label=New file