diff --git a/.changeset/tame-cups-shine.md b/.changeset/tame-cups-shine.md new file mode 100644 index 00000000..b68cc661 --- /dev/null +++ b/.changeset/tame-cups-shine.md @@ -0,0 +1,19 @@ +--- +"@tailor-platform/app-shell": minor +--- + +Allow the standalone `Select`, `Combobox`, and `Autocomplete` (including their `.Async` variants) to receive an accessible name via `aria-label`, `aria-labelledby`, and `id`. Previously these props were silently dropped, leaving the combobox with only its current value as an accessible name — a WCAG 4.1.2 issue for filters and toolbars used outside a `Form`. The props are now forwarded to the underlying trigger/input. + +```tsx +// Announced as "Direction filter, combobox" instead of just its value + + +// Or point at a visible label +From +); + expect(screen.getByRole("combobox", { name: "Direction filter" })).toBeDefined(); + }); + + it("forwards aria-labelledby to the trigger", () => { + render( + <> + From + ); + expect(screen.getByRole("combobox").getAttribute("id")).toBe("direction-select"); + }); + + it("forwards aria-label to the trigger in multiple mode", () => { + render(