Nested buttons from TooltipTrigger without asChild
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 73/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- accessibility, frontend
Research direction
Start with packages/client/src/components/ui/tooltip.tsx and inspect the listed TooltipTrigger usages in merge-charges/index.tsx, download-csv-button.tsx, close-document-button.tsx, preview-document-modal.tsx, and template-manager.tsx. Check the existing component tests or stories, then verify the All Charges page and Charges and Balance tabs for nesting warnings and tooltip behavior on disabled buttons. Done when those warnings are gone and a test or story covers the disabled tooltip case.
Written by the indexing model from the issue text.
Description
Problem
Some uses of the shadcn TooltipTrigger (packages/client/src/components/ui/tooltip.tsx) omit asChild. The Radix trigger renders its own <button>, so when it wraps a <Button> the page contains a button inside a button. React logs a validateDOMNesting warning, and the markup is invalid HTML (focus and click handling can misbehave).
Confirmed in a browser:
packages/client/src/components/common/merge-charges/index.tsx(MergeChargesButton):DialogTrigger→TooltipTrigger→Button, three buttons deep. It shows on every charges table with merge selection (All Charges, business and tax category Charges tabs, …).packages/client/src/components/common/buttons/download-csv-button.tsx(DownloadCSVButton):TooltipTrigger→Button. It shows on business-ledger balance views (the business and tax category Balance tabs and the full-screen ledger).
Other <TooltipTrigger> uses without asChild to check:
packages/client/src/components/common/buttons/close-document-button.tsx(two)packages/client/src/components/common/modals/preview-document-modal.tsxpackages/client/src/components/reports/dynamic-report/dialogs/template-manager.tsx
Fix
Use <TooltipTrigger asChild> around the button. A disabled <button> fires no pointer events, so where the tooltip has to show while the button is disabled (the merge button explains why merging is unavailable; the CSV button says "Preparing download…"), wrap the button in a <span> and make the span the asChild trigger. Nested triggers (DialogTrigger inside TooltipTrigger) each need asChild.
Done when
No validateDOMNesting warning on the All Charges page or the Charges and Balance tabs. The tooltips still show, including on disabled buttons, and there is a test or story for the disabled-tooltip case.
- Dominant language
- TypeScript
- Stars
- 30
- Forks
- 10
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 276
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Urigo/accounter-fullstack
-
1214 annual-audit-workflow
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Urigo/accounter-fullstack#5257 ·
Maintainers usually reply within 2 days
-
1214 annual-audit-workflow
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Urigo/accounter-fullstack#5256 ·
Maintainers usually reply within 2 days
-
annual-audit-workflow
Difficulty 1/5 1-3 hours Newbie friendliness 87/100
Urigo/accounter-fullstack#5252 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Urigo/accounter-fullstack#4919 ·
Maintainers usually reply within 2 days
-
Business-trip attendee mutations throw TypeError instead of a clear error when no row is affectedOpen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Urigo/accounter-fullstack#4917 ·
Maintainers usually reply within 2 days
All issues in Urigo/accounter-fullstack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area:vscode bug has repro platform:macos platform:vscode regression
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
effort/l priority/p1 risk/high triage/core
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
iflytek/skillhub#1188 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Fission-AI/OpenSpec#2337 ·
Maintainers usually reply within 1 day