Accessibility in Blazor Menu Bar
14 Aug 20265 minutes to read
The Blazor Menu Bar component follows the accessibility guidelines and standards, including ADA, Section 508, WCAG 2.2 standards, and WCAG roles that are commonly used to evaluate accessibility.
The following table summarizes the Blazor Menu Bar component’s accessibility compliance.
| Accessibility Criteria | Compatibility |
|---|---|
| WCAG 2.2 Support | AA |
| Section 508 Support | ![]() |
| Screen Reader Support | ![]() |
| Right-To-Left Support | ![]() |
| Color Contrast | ![]() |
| Mobile Device Support | ![]() |
| Keyboard Navigation Support | ![]() |
| Axe-core Accessibility Validation | ![]() |
- All features of the component meet the requirement.
- Some features of the component do not meet the requirement.
- The component does not meet the requirement.WAI-ARIA attributes
The Blazor Menu Bar component follows the WAI-ARIA patterns to meet the accessibility requirements. The following ARIA attributes are used in the Blazor Menu Bar component:
| Attributes | Purpose |
|---|---|
role |
Identifies the Menu Bar’s root as menubar, the popup as menu, and each popup item as menuitem. |
aria-haspopup |
Indicates the availability and type of interactive popup element. |
aria-expanded |
Indicates whether the subtree is expanded or collapsed. |
aria-orientation |
Indicates whether the orientation is horizontal or vertical. The default orientation is horizontal. |
aria-label |
Provides an accessible name for the menu item. |
aria-disabled |
Indicates whether the menu item is disabled. |
Keyboard interaction
The Blazor Menu Bar component follows the keyboard interaction guideline, making it easy for people who use assistive technologies (AT) and those who completely rely on keyboard navigation. The following keyboard shortcuts are supported by the Blazor Menu Bar component.
| Windows | Mac | Actions |
|---|---|---|
| Esc | Esc | Closes the submenu that contains focus and returns focus to the parent element. |
| Enter | Enter | Opens the submenu if the focused menu item has one and places focus on its first item; otherwise, activates the item and closes the submenu. |
| ↑ | ↑ | Navigates to the previous menu item. |
| ↓ | ↓ | Navigates to the next menu item. |
| ← | ← | When a submenu is open, closes it and returns focus to the parent menu item. When focus is on a root menu item, moves focus to the previous root menu item. |
| → | → | When focus is on a root menu item that has a submenu, opens that submenu. When focus is on a root menu item without a submenu, moves focus to the next root menu item. |
| Home | Home | Moves focus to the first menu item. |
| End | End | Moves focus to the last menu item. |
Ensuring accessibility
The Blazor Menu Bar component’s accessibility is validated with the axe-core accessibility engine through Playwright tests.
The accessibility compliance of the Blazor Menu Bar component is shown in the following sample. Open the sample in a new window to evaluate the accessibility of the Blazor Menu Bar component with accessibility tools.