-
+
+ {query}
+
{searchSuggestions[1].map((suggestion) => (
{({ active }) => (
diff --git a/src/components/widgets/search/search.test.jsx b/src/components/widgets/search/search.test.jsx
index d22800306..6c0fb0328 100644
--- a/src/components/widgets/search/search.test.jsx
+++ b/src/components/widgets/search/search.test.jsx
@@ -178,6 +178,28 @@ describe("components/widgets/search", () => {
openSpy.mockRestore();
});
+ it("gives every provider option an accessible name", () => {
+ renderWithProviders(
+ ,
+ { settings: {} },
+ );
+
+ expect(screen.getAllByRole("option").map((option) => option.textContent)).toEqual([
+ "Google",
+ "DuckDuckGo",
+ "Brave",
+ ]);
+ });
+
+ it("labels the search input and the provider button", () => {
+ renderWithProviders(, {
+ settings: {},
+ });
+
+ expect(screen.getByRole("textbox")).toHaveAccessibleName("search.placeholder");
+ expect(screen.getByRole("button")).toHaveAccessibleName(/search\.provider/);
+ });
+
it("fetches search suggestions and triggers a search when a suggestion is selected", async () => {
const openSpy = vi.spyOn(window, "open").mockImplementation(() => null);