Skip to content

Commit a9ce6e4

Browse files
committed
refactor(aria/menu): rename isActive to active
(cherry picked from commit 0423c3f)
1 parent 8beb22f commit a9ce6e4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/aria/menu/menu.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ export class MenuBar<V> {
404404
'role': 'menuitem',
405405
'(focusin)': '_pattern.onFocusIn()',
406406
'[attr.tabindex]': '_pattern.tabIndex()',
407-
'[attr.data-active]': 'isActive()',
407+
'[attr.data-active]': 'active()',
408408
'[attr.aria-haspopup]': 'hasPopup()',
409409
'[attr.aria-expanded]': 'expanded()',
410410
'[attr.aria-disabled]': '_pattern.disabled()',
@@ -445,7 +445,7 @@ export class MenuItem<V> {
445445
readonly submenu = input<Menu<V> | undefined>(undefined);
446446

447447
/** Whether the menu item is active. */
448-
readonly isActive = computed(() => this._pattern.isActive());
448+
readonly active = computed(() => this._pattern.active());
449449

450450
/** Whether the menu is expanded. */
451451
readonly expanded = computed(() => this._pattern.expanded());

src/aria/private/menu/menu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ export class MenuItemPattern<V> implements ListItem<V> {
710710
element: SignalLike<HTMLElement | undefined>;
711711

712712
/** Whether the menu item is active. */
713-
isActive = computed(() => this.inputs.parent()?.inputs.activeItem() === this);
713+
active = computed(() => this.inputs.parent()?.inputs.activeItem() === this);
714714

715715
/** Whether the menu item has received focus. */
716716
hasBeenFocused = signal(false);

0 commit comments

Comments
 (0)