Skip to content

fix: keep Number Field invalid ring visible when blurred#101

Open
focus0802 wants to merge 1 commit into
keenthemes:mainfrom
focus0802:codex/fix-number-field-invalid-ring
Open

fix: keep Number Field invalid ring visible when blurred#101
focus0802 wants to merge 1 commit into
keenthemes:mainfrom
focus0802:codex/fix-number-field-invalid-ring

Conversation

@focus0802

Copy link
Copy Markdown
Contributor

What

Keep Number Field invalid styling visible after focus leaves the control, matching the existing Input, Select, and Input Group behavior.

Root cause

numberFieldGroupVariants set the destructive ring color but did not set an invalid ring width. The only ring width was attached to focus-within:ring-3, so an invalid blurred Number Field rendered only a destructive 1px border.

The descendant invalid selectors were also scoped to focus-within, which meant an invalid NumberFieldInput could not keep the visual Group in its invalid state after focus moved away.

Changes

  • Add aria-invalid:ring-3 for Group-level invalid state.
  • Use has-aria-invalid:* and has-aria-invalid:ring-3 so a descendant invalid input styles the Group while blurred.
  • Apply the same fix to the Base UI and Radix registry sources.
  • Regenerate all 16 style-aware Number Field registry files.

Verification

  • pnpm registry:all passes: 2,462 registry items verified across 16 styles.
  • pnpm build passes, including registry production generation and Next.js production build.
  • Targeted ESLint passes for both changed source files.
  • Full pnpm lint and pnpm typecheck currently report pre-existing repository-wide errors unrelated to this change.

@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

@focus0802 is attempting to deploy a commit to the Keenthemes Team on Vercel.

A member of the Team first needs to authorize it.

@focus0802
focus0802 marked this pull request as draft July 19, 2026 06:12
@focus0802
focus0802 marked this pull request as ready for review July 20, 2026 14:05
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.

1 participant