Skip to content

chore: link label to select#3

Merged
PavelVanecek merged 1 commit intorecharts:mainfrom
kristof-mattei:label-for
Mar 23, 2026
Merged

chore: link label to select#3
PavelVanecek merged 1 commit intorecharts:mainfrom
kristof-mattei:label-for

Conversation

@kristof-mattei
Copy link
Copy Markdown
Contributor

@kristof-mattei kristof-mattei commented Mar 23, 2026

Fixes the following issue in the dev console:

Screenshot 2026-03-23 095149 Screenshot 2026-03-23 095153

Summary by CodeRabbit

  • Refactor
    • Enhanced semantic associations between form labels and controls in the developer tools interface, improving accessibility of form interactions.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7c0199b1-36f8-4313-ad4e-383288fdf360

📥 Commits

Reviewing files that changed from the base of the PR and between 40a1f23 and 9073f26.

📒 Files selected for processing (1)
  • src/components/RechartsDevtools.tsx

Walkthrough

Added a unique selectId using React.useId() to establish proper label-to-control association in the "Inspect Hook" form. The ID is wired to both the label's htmlFor attribute and the select element's id attribute for semantic correctness.

Changes

Cohort / File(s) Summary
Accessibility Enhancement
src/components/RechartsDevtools.tsx
Added React.useId() to generate a unique selectId and wired it to the label's htmlFor and the select's id for proper semantic label-control association.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: link label to select' directly describes the main change: establishing a proper association between a label and select form control via htmlFor/id attributes to fix accessibility issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kristof-mattei kristof-mattei marked this pull request as ready for review March 23, 2026 16:55
@PavelVanecek PavelVanecek merged commit 2e8d78b into recharts:main Mar 23, 2026
2 checks passed
@kristof-mattei kristof-mattei deleted the label-for branch March 24, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants