Skip to content

Research filters expose nested interactive controls and unnamed checkboxes #952

@MaxGhenis

Description

@MaxGhenis

Summary

The research filter panel exposes nested interactive controls: each filter row is a focusable button-like wrapper around a checkbox primitive. This leads to unnamed checkbox findings in Lighthouse and a confusing accessibility tree.

Reproduction

  1. Run the website locally with WEBSITE_PORT=3000 CALCULATOR_PORT=3001 bun run dev.
  2. Open http://localhost:3000/us/research.
  3. Run Lighthouse accessibility or inspect the filter controls with an accessibility tree viewer.
  4. Filter options under Type / Topic / Location / Author are reported as unnamed controls.

Expected

Each filter option should expose a single, clearly labeled control.

Actual

The row wrapper is interactive (role="button", tabIndex=0) and also contains a Radix checkbox root, so there are nested semantics and the checkbox itself is not correctly labeled in practice.

Relevant code

  • website/src/app/[countryId]/research/ResearchClient.tsx (CheckboxRow)
  • website/src/components/ui/checkbox.tsx

Suggested direction

Replace the wrapper-with-checkbox pattern with either:

  • a native <label> + one checkbox, or
  • one custom control with explicit checked semantics

But not both at once.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions