From 259488fd33fce55fd7c1e4f5d24bccf1162d7aac Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 1 Aug 2026 18:11:14 +0000 Subject: [PATCH] =?UTF-8?q?B103=20=E2=80=94=20omit=20Sugest=C3=B5es=20head?= =?UTF-8?q?ing=20in=20home=20search=20suggest=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hide the visible h2 when resultKind is suggest; keep aria-label on the section for screen readers. Search mode still shows Municípios heading. Co-authored-by: Francisco Solla --- .../dashboard/HomeSearchMunicipalityGroup.tsx | 3 +- tests/unit/homeSearchUi.unit.spec.tsx | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/components/campaign/dashboard/HomeSearchMunicipalityGroup.tsx b/src/components/campaign/dashboard/HomeSearchMunicipalityGroup.tsx index a05613e2..49373bb7 100644 --- a/src/components/campaign/dashboard/HomeSearchMunicipalityGroup.tsx +++ b/src/components/campaign/dashboard/HomeSearchMunicipalityGroup.tsx @@ -26,10 +26,11 @@ export const HomeSearchMunicipalityGroup = () => { if (visibleMunicipalities.length === 0 && visibleTerritories.length === 0) return null const sectionTitle = resultKind === 'suggest' ? 'Sugestões' : 'Municípios' + const showHeading = resultKind !== 'suggest' return (
-

{sectionTitle}

+ {showHeading ?

{sectionTitle}

: null}
    {visibleMunicipalities.map((hit) => (
  • diff --git a/tests/unit/homeSearchUi.unit.spec.tsx b/tests/unit/homeSearchUi.unit.spec.tsx index 9a5d7f8d..9b3f41a6 100644 --- a/tests/unit/homeSearchUi.unit.spec.tsx +++ b/tests/unit/homeSearchUi.unit.spec.tsx @@ -55,6 +55,34 @@ describe('HomeSearchHitRow', () => { }) describe('HomeSearchMunicipalityGroup', () => { + it('omits the visible heading in suggest mode while keeping an accessible section name', () => { + render( + + + , + ) + + expect(screen.queryByRole('heading', { name: 'Sugestões' })).toBeNull() + expect(screen.getByRole('region', { name: 'Sugestões' })).toBeTruthy() + expect(screen.getByRole('link', { name: /Cairu/i })).toBeTruthy() + }) + it('renders a discreet sentence-case heading and list without bullets', () => { const { container } = render(