mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
fix(list-box-selection): fix aria-label
for clear button (#2134)
`ListBoxSelection`, used by `MultiSelect` and `ComboBox`, currently applies the wrong `aria-label` for the clear selection button. It uses the `translateId` (e.g., `"clearAll"`) instead of the user-friendly copy.
This commit is contained in:
parent
c6c80d35a9
commit
dd1338ffc4
3 changed files with 16 additions and 5 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue