fix(a11y): add accessible labels to unlabeled form controls - #23
Conversation
React Doctor's accessibility pass flagged form controls whose only "label" was a placeholder (not an accessible name) or a hidden file input with no name. Add aria-label to the five genuine cases: - project collaboration composer textarea - portal project message composer textarea - clients search input - project files + portal files hidden upload inputs Skipped two false positives: the client-access dialog button already gets its name from projected text, and the onboarding slug input already has an associated <FieldLabel htmlFor>. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 18 minutes and 48 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
React Doctor found no issues. 🎉 Reviewed by React Doctor for commit |
Greptile SummaryThis PR adds
Confidence Score: 4/5Safe to merge; all changes are additive attribute additions with no runtime behaviour impact. The three textarea and search-input fixes are correct and improve accessibility as intended. The two
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Form Control] --> B{Visible in accessibility tree?}
B -- Yes / display:block --> C[aria-label applied and announced ✅]
B -- No / display:none --> D[Removed from a11y tree, aria-label ignored ⚠️]
C --> E[project-collaboration textarea]
C --> F[portal project textarea]
C --> G[clients search input]
D --> H[project-files-panel hidden file input]
D --> I[portal/files hidden file input]
H --> J[Trigger button has visible text 'Choose Files' — accessible ✅]
I --> K[Drop-zone button has visual content — accessible ✅]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[Form Control] --> B{Visible in accessibility tree?}
B -- Yes / display:block --> C[aria-label applied and announced ✅]
B -- No / display:none --> D[Removed from a11y tree, aria-label ignored ⚠️]
C --> E[project-collaboration textarea]
C --> F[portal project textarea]
C --> G[clients search input]
D --> H[project-files-panel hidden file input]
D --> I[portal/files hidden file input]
H --> J[Trigger button has visible text 'Choose Files' — accessible ✅]
I --> K[Drop-zone button has visual content — accessible ✅]
|
What
Adds
aria-labelto five form controls flagged by React Doctor's accessibility pass whose only "label" was a placeholder (which is not an accessible name) or a hidden file input with no name:<textarea><textarea><input><input>sSkipped (false positives)
client-access-dialog.tsx:20— the trigger<button>already gets its accessible name from projected "Are you a client?" text (base-uirenderprop the analyzer didn't trace).onboarding-form.tsx:128— the slug input already has an associated<FieldLabel htmlFor="slug">.Notes
Part of the focused React Doctor follow-up. We deliberately did not commit a
doctor.config.ts(it would flip CI to full-lint mode); these are genuine, low-risk a11y wins worth doing on their own merit.typecheck+lintpass locally.🤖 Generated with Claude Code