fix(list-box-selection): fix aria-label for clear button

This commit is contained in:
Eric Liu 2025-03-22 08:42:02 -07:00
commit 3f2bcf75a0
3 changed files with 16 additions and 5 deletions

View file

@ -166,15 +166,14 @@ describe("MultiSelect", () => {
expect(screen.queryByText("Fax")).not.toBeInTheDocument();
});
// TODO(bug): ListBoxSelection aria-labels should be user-friendly
it.skip("should clear filter on selection clear", async () => {
it("should clear filter on selection clear", async () => {
render(MultiSelect, {
items,
filterable: true,
selectedIds: ["0"],
});
const clearButton = screen.getByLabelText("Clear all");
const clearButton = screen.getByLabelText("Clear all selected items");
await user.click(clearButton);
const input = screen.getByRole("combobox");