Skip to content

react-doctor: fix all 7 BLOCKING errors (rules-of-hooks + role-has-required-aria-props) #266

@bntvllnt

Description

@bntvllnt

Source

`npx react-doctor . --json` — score 62 / 100, 7 errors, 1769 warnings.

Errors (BLOCKING)

Rule Count File:line
`rules-of-hooks` 5 story files calling `useState` from anonymous render fns
`role-has-required-aria-props` 2 combobox missing `aria-controls`

All locations

  • `registry/default/combobox/combobox.tsx:129` — `role-has-required-aria-props`: `combobox` role missing `aria-controls`
  • `src/components/combobox/combobox.tsx:129` — `role-has-required-aria-props`: same
  • `src/components/conversation-thread/conversation-thread.stories.tsx:94` — `rules-of-hooks`
  • `src/components/tags-input/tags-input.stories.tsx:32` — `rules-of-hooks`
  • `src/components/segmented-control/segmented-control.stories.tsx:40` — `rules-of-hooks`
  • `src/components/multi-select/multi-select.stories.tsx:39` — `rules-of-hooks`
  • `src/components/ai-chat-input/ai-chat-input.stories.tsx:19` — `rules-of-hooks`

Acceptance criteria

  • All 5 `rules-of-hooks` violations: extract render-prop bodies into named React components (start uppercase) so hooks are called from a real component scope.
  • Both `role-has-required-aria-props`: add `aria-controls={listboxId}` (and matching `id` on the listbox) per WAI-ARIA combobox pattern.
  • `registry/default/` and `src/components/` are duplicates — fix in source then regenerate registry (avoid drift).
  • `pnpm doctor` reports 0 errors after fix.
  • Add unit / story test for combobox a11y (axe-core in Storybook story play function).

Reproduce

```bash
pnpm doctor # alias added in DX issue
npx react-doctor . --fail-on error
```

Metadata

Metadata

Assignees

Labels

a11yAccessibilitybugSomething isn't workingreact-doctorReported by react-doctor (codebase health)

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions