{% load brickwork_icons %} {% comment %} Topbar search component (#155). Rendered only by {% bw_search %}, whose tag requires a real GET action and validates the optional scope mapping. No-JS floor: this remains an ordinary
, native search input, submit button, hidden scope field, and clear anchor. Consumers own the endpoint and the clear URL because only they know which query parameters to preserve. Arguments (via {% bw_search %}): action (required), name (default "q"), placeholder (default "Search"), value, scope ({label, name, value, clear_href, clear_label?}). States: no scope / scoped-to-one-value (the optional scope chip with its own clear link); no other open/closed state, the whole control is always a plain visible form. Accessibility: role="search" on the form landmark; the visible input's accessible name is a visually-hidden label rather than a placeholder alone (a placeholder is not a reliable accessible name); the submit button is icon-only with an aria-label. Covered by the dedicated search-.html fixture (a11y/generate_fixtures.py's render_search, #226), which renders a plain bw_search and a scoped bw_search (the scope chip and its clear link) so the axe, keyboard and no-JS gates all examine the real markup; tests/test_search.py's Python-level render assertions remain the floor for the tag's own argument handling. Responsive: no breakpoint switch; no width-dependent CSS on any .bw-search* selector. min-inline-size: 0 on the input lets it contract inside a narrow topbar rather than forcing the shell wide, fluid at every viewport rather than a named-breakpoint jump. {% endcomment %} {% if scope %} {{ scope.label }} × {% endif %}