mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
Revert "fix(list-box): use aria-disabled
instead of invalid disabled
attribute" (#2130)
This reverts commit e1b3ef22c9
.
This commit is contained in:
parent
be9c13fbc6
commit
199bb0eb8e
2 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@
|
||||||
class:bx--list-box__menu-item--active={active}
|
class:bx--list-box__menu-item--active={active}
|
||||||
class:bx--list-box__menu-item--highlighted={highlighted || active}
|
class:bx--list-box__menu-item--highlighted={highlighted || active}
|
||||||
aria-selected={active}
|
aria-selected={active}
|
||||||
aria-disabled={disabled ? true : undefined}
|
disabled={disabled ? true : undefined}
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
on:mouseenter
|
on:mouseenter
|
||||||
|
|
|
@ -165,7 +165,7 @@ describe("ComboBox", () => {
|
||||||
await user.click(screen.getByRole("textbox"));
|
await user.click(screen.getByRole("textbox"));
|
||||||
const disabledOption = screen.getByText(/Fax/).closest('[role="option"]');
|
const disabledOption = screen.getByText(/Fax/).closest('[role="option"]');
|
||||||
assert(disabledOption);
|
assert(disabledOption);
|
||||||
expect(disabledOption).toHaveAttribute("aria-disabled", "true");
|
expect(disabledOption).toHaveAttribute("disabled", "true");
|
||||||
|
|
||||||
await user.click(disabledOption);
|
await user.click(disabledOption);
|
||||||
expect(screen.getByRole("textbox")).toHaveValue("");
|
expect(screen.getByRole("textbox")).toHaveValue("");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue