Skip to content

fix(a11y): improve accessibility#45

Merged
gameroman merged 2 commits into
mainfrom
fix-a11y
Jul 20, 2026
Merged

fix(a11y): improve accessibility#45
gameroman merged 2 commits into
mainfrom
fix-a11y

Conversation

@gameroman

@gameroman gameroman commented Jul 17, 2026

Copy link
Copy Markdown
Member

Closes #43

Summary by CodeRabbit

  • New Features

    • Added a preview command for viewing the site locally after building.
  • Improvements

    • Redesigned the “Limit Results” control with clearer inline minus and plus buttons.
    • Preserved result limits between 1 and 3,000, changing in increments of 50.
    • Updated mobile viewport behavior for a simpler, more consistent display.
  • Chores

    • Formatting checks now include linting.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@gameroman, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

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, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 149a47ce-f53b-41cc-8007-f709ce5e36a8

📥 Commits

Reviewing files that changed from the base of the PR and between d28bbef and f118549.

📒 Files selected for processing (1)
  • src/components/App.tsx
📝 Walkthrough

Walkthrough

The pull request redesigns the “Limit Results” control, enables Biome linting in the format script, adds an Astro preview script, and simplifies viewport metadata.

Changes

UI and tooling updates

Layer / File(s) Summary
Limit Results control
src/components/App.tsx
Replaces the vertical icon button group with inline “−” and “+” buttons that adjust the value by 50 and clamp it between 1 and 3000.
Formatting and preview scripts
package.json
Removes the Biome linter-disable flag from format and adds the preview script.
Viewport metadata
src/layouts/Layout.astro
Simplifies the viewport tag to use initial-scale=1.0 only.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the accessibility-focused UI and metadata changes in the pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-a11y

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.

@gameroman gameroman added the a11y Related to accessibility label Jul 17, 2026
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

Preview deployment

✅ Deployment complete!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/App.tsx (1)

256-262: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Allow the input to be cleared.

The current onInput logic immediately forces the value to "1" when the user clears the input field (e.g., by pressing Backspace). This creates a frustrating user experience, as it prevents users from cleanly deleting the current number to type a new one.

Allowing the state to be an empty string resolves this issue, and it is safely handled as a fallback (200) during analysis submission in startAnalysis.

🐛 Proposed fix
-                onInput={(e) => {
-                  const next = Math.min(
-                    3000,
-                    Math.max(1, parseInt(e.currentTarget.value, 10) || 1),
-                  );
-                  setLimitInput(next.toString());
-                }}
+                onInput={(e) => {
+                  const val = e.currentTarget.value;
+                  if (val === "") {
+                    setLimitInput("");
+                    return;
+                  }
+                  const next = Math.min(
+                    3000,
+                    Math.max(1, parseInt(val, 10) || 1),
+                  );
+                  setLimitInput(next.toString());
+                }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/App.tsx` around lines 256 - 262, Update the input handler in
the limit field’s onInput callback to preserve an empty string when the user
clears the field, rather than immediately coercing it to 1. Continue clamping
valid numeric values between 1 and 3000, and retain the existing startAnalysis
fallback behavior for submission.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/components/App.tsx`:
- Around line 256-262: Update the input handler in the limit field’s onInput
callback to preserve an empty string when the user clears the field, rather than
immediately coercing it to 1. Continue clamping valid numeric values between 1
and 3000, and retain the existing startAnalysis fallback behavior for
submission.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b1f58385-ca86-4c69-988c-069e6c04b87d

📥 Commits

Reviewing files that changed from the base of the PR and between a5cae2d and d28bbef.

📒 Files selected for processing (3)
  • package.json
  • src/components/App.tsx
  • src/layouts/Layout.astro

@gameroman
gameroman merged commit b00c793 into main Jul 20, 2026
3 checks passed
@gameroman
gameroman deleted the fix-a11y branch July 20, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a11y Related to accessibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Address a11y reports from Lighthouse

1 participant