PolicyEngine / PolicyEngine/policyengine-app-v2

Research filters expose nested interactive controls and unnamed checkboxes

Open Beginner friendly
#952 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1
Forks
3
Avg merge
1d 50m
Merged PRs (30d)
39

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in website/src/app/[countryId]/research/ResearchClient.tsx at CheckboxRow and inspect website/src/components/ui/checkbox.tsx to trace the nested control semantics. Run the website with the documented Bun command, inspect the research filters with Lighthouse or an accessibility tree viewer, and finish when each option exposes one clearly labeled control without nested interactive semantics.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, react, typescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.