From 199bb0eb8e27c485de46295dcf0ee25f8cbccf5f Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Wed, 19 Mar 2025 13:05:28 -0700 Subject: [PATCH] Revert "fix(list-box): use `aria-disabled` instead of invalid `disabled` attribute" (#2130) This reverts commit e1b3ef22c9ee09474bacadbb0b22b41326566bab. --- src/ListBox/ListBoxMenuItem.svelte | 2 +- tests/ComboBox/ComboBox.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ListBox/ListBoxMenuItem.svelte b/src/ListBox/ListBoxMenuItem.svelte index 569f0e9e..dd2ff422 100644 --- a/src/ListBox/ListBoxMenuItem.svelte +++ b/src/ListBox/ListBoxMenuItem.svelte @@ -25,7 +25,7 @@ class:bx--list-box__menu-item--active={active} class:bx--list-box__menu-item--highlighted={highlighted || active} aria-selected={active} - aria-disabled={disabled ? true : undefined} + disabled={disabled ? true : undefined} {...$$restProps} on:click on:mouseenter diff --git a/tests/ComboBox/ComboBox.test.ts b/tests/ComboBox/ComboBox.test.ts index 697031a8..2ac7534f 100644 --- a/tests/ComboBox/ComboBox.test.ts +++ b/tests/ComboBox/ComboBox.test.ts @@ -165,7 +165,7 @@ describe("ComboBox", () => { await user.click(screen.getByRole("textbox")); const disabledOption = screen.getByText(/Fax/).closest('[role="option"]'); assert(disabledOption); - expect(disabledOption).toHaveAttribute("aria-disabled", "true"); + expect(disabledOption).toHaveAttribute("disabled", "true"); await user.click(disabledOption); expect(screen.getByRole("textbox")).toHaveValue("");