dap-design-system 0.53.2 → 0.53.3

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.
@@ -119,6 +119,7 @@ export default class DapDSNavigationMenuItem extends DapDSNavigationMenuItem_bas
119
119
  hasContent: boolean;
120
120
  private active;
121
121
  private openedByHover;
122
+ private _isRovingActive;
122
123
  /** Computed property to detect if this item contains nested navigation menu items. */
123
124
  get hasNestedItems(): boolean;
124
125
  private get _trigger();
@@ -153,6 +154,22 @@ export default class DapDSNavigationMenuItem extends DapDSNavigationMenuItem_bas
153
154
  /** Check if target is within any nested navigation menu items. */
154
155
  private _isWithinNestedItems;
155
156
  focus(): void;
157
+ /**
158
+ * Sets this item as the active (or inactive) roving tabindex target.
159
+ * Only the active item's trigger is in the sequential tab order (tabindex="0").
160
+ * All others are removed (tabindex="-1") so Tab exits the whole nav in one step.
161
+ */
162
+ setRovingTabIndex(active: boolean): void;
163
+ /** Apply tabindex to a trigger element and its shadow-root inner focusable element. */
164
+ private _applyTriggerTabIndex;
165
+ /** Focus the first focusable element in the dropdown (supports both nested nav items and mega menu content). */
166
+ focusFirstDropdownChild(): void;
167
+ /** Focus the last focusable element in the dropdown (supports both nested nav items and mega menu content). */
168
+ focusLastDropdownChild(): void;
169
+ /** Get all top-level focusable items inside the popup slot content (for mega menu arrow navigation). */
170
+ private _getFocusablePopupItems;
171
+ private _collectFocusableItems;
172
+ private _focusPopupItem;
156
173
  showDropDown(byHover?: boolean): Promise<void>;
157
174
  hideDropDown(): Promise<void>;
158
175
  /** Handle trigger slot change events. */
@@ -53,13 +53,14 @@ export default class DapDSNavigationMenu extends DdsElement {
53
53
  /** Gets all slotted menu items, ignoring disabled elements */
54
54
  getAllItems(): DapDSNavigationMenuItem[];
55
55
  /**
56
- * Gets the current menu item, which is the menu item that has `tabindex="0"` within the roving tab index.
56
+ * Gets the current menu item (the one marked with `data-nav-current`).
57
57
  * The menu item may or may not have focus, but for keyboard interaction purposes it's considered the "active" item.
58
58
  */
59
59
  getCurrentItem(): DapDSNavigationMenuItem | undefined;
60
60
  /**
61
- * Sets the current menu item to the specified element. This sets `tabindex="0"` on the target element and
62
- * `tabindex="-1"` to all other items. This method must be called prior to setting focus on a menu item.
61
+ * Sets the current menu item. Applies roving tabindex to the trigger elements so that only
62
+ * the active item's trigger is in the sequential tab order (tabindex="0"). All others get
63
+ * tabindex="-1" so a single Tab exits the entire navigation.
63
64
  */
64
65
  setCurrentItem(item: DapDSNavigationMenuItem): void;
65
66
  private _updateChildFullWidth;