@ojiepermana/angular-navigation 22.0.44 → 22.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -165,8 +165,12 @@ class NavigationService {
165
165
  routerLinkActiveOptions(item) {
166
166
  return item.isActiveMatchOptions ?? (item.exactMatch ? this.exactMatchOptions : this.subsetMatchOptions);
167
167
  }
168
- itemRole(orientation, level) {
169
- return orientation === 'horizontal' || level > 0 ? 'menuitem' : null;
168
+ itemRole(orientation, _level) {
169
+ // Horizontal navs are menubars/menus (arrow-key roving) menuitem. Vertical
170
+ // navs are plain lists of links (tab navigation, no menu keyboard model), so
171
+ // their items must NOT be menuitems — a menuitem inside a `list` is an invalid
172
+ // ARIA parent (axe `aria-required-parent`).
173
+ return orientation === 'horizontal' ? 'menuitem' : null;
170
174
  }
171
175
  compactLabel(item, compact) {
172
176
  return compact ? (item.tooltip ?? item.title ?? null) : null;