Improve field accessibility semantics - #7
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 21 minutes and 53 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: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
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 |
🤖 Augment PR SummarySummary: This PR improves admin-field accessibility semantics by ensuring visible labels are programmatically associated with their controls. Changes:
Technical Notes: The new tests validate label/grouping patterns at the source level to make accessibility semantics easy to review. 🤖 Was this summary useful? React with 👍 or 👎 |
| ) : type === "select" ? ( | ||
| <Select | ||
| aria-label={field.label} | ||
| label={field.label} |
There was a problem hiding this comment.
src/admin.tsx:285 — This swaps aria-label for Kumo Select’s label prop; can we confirm label actually creates an accessible name association for the underlying control (otherwise this could be an a11y regression)? Other locations where this applies: src/admin.tsx:471.
Severity: medium
Other Locations
src/admin.tsx:471
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| {choice.icon ? renderChoiceCardLabel(choice) : (choice.label ?? choice.value)} | ||
| </label> | ||
| ))} | ||
| <fieldset id={id} style={fieldsetStyle}> |
There was a problem hiding this comment.
src/admin.tsx:598 — In the multiple branch, the wrapper changed from a focusable <div id={id} tabIndex={-1}> to a <fieldset id={id}>, which is not programmatically focusable by default. If any error/scroll-to-field code calls .focus() on the widget root by id, this could break that behavior.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| <fieldset id={id} style={fieldsetStyle}> | ||
| <legend style={legendStyle}>{legend}</legend> | ||
| {choicesList.map((choice) => { | ||
| const inputId = choiceInputId(id, choice.value); |
There was a problem hiding this comment.
src/admin.tsx:601 — choiceInputId() sanitizes values, which can cause distinct choice.values to collapse to the same id (e.g., "a b" vs "a-b"), breaking label→input association and creating duplicate IDs. Consider ensuring IDs are guaranteed-unique even after normalization.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Motivation
Description
<label htmlFor={id}>/idassociations for text/textarea/number/url subfields and for checkbox subfields insrc/admin.tsx.labelprop forSelectcontrols and add explicit<label htmlFor=...>for linkValue/Textinputs and the link checkbox control.<fieldset>/<legend>wrappers in both horizontal (card) and multiple-choice layouts, and give individual choice inputs explicitid/htmlForassociations while preserving visual styles.test/semantics.test.mjsand exposenpm testinpackage.jsonto make label/grouping semantics reviewable.Testing
npm run checkand it passed with no formatting or lint errors.npm testwhich executed the new Node tests and all tests passed.npm run typecheck(tsc --noEmit) and it completed successfully with no type errors.npm run buildand the package built successfully producingdist/outputs.Closes #3
Codex Task