Skip to content

fix(theme): show the not-allowed cursor on disabled fields - #338

Merged
alexgrozav merged 2 commits into
mainfrom
field-disabled-cursor-uxf-372
Oct 19, 2026
Merged

alexgrozav merged 2 commits into
mainfrom
field-disabled-cursor-uxf-372

Conversation

@alexgrozav

Copy link
Copy Markdown
Contributor

Description

The shared field surface set pointer-events: none on a disabled field. That also hid the field's own not-allowed cursor, so a disabled Input, Textarea, Input Date or OTP cell showed a plain arrow. This drops it from fieldSurfaceCompoundVariants, which reaches useInputRecipe, useTextareaRecipe, useInputDateRecipe and useOtpCellRecipe.

  • Nested field cursor. The useFieldSelector reset now gives a disabled .input-field and .textarea-field cursor: not-allowed, so the inner control shows it even without the sanitize preset.
  • Resize handle. The page promises the handle is off on a disabled textarea. pointer-events: none used to keep that promise, so the textarea setup now adds .textarea .textarea-field:disabled { resize: none }. It has the same specificity as the -resize-* selectors and comes after them, so it wins on every axis.
  • Docs. The Disabled passages on the Input, Input Date, OTP and Textarea pages no longer say the state "blocks pointer interaction". Input asks you to disable a clear or reveal button in the suffix, and Input Date asks you to skip your own pointer handlers while disabled. The Textarea addon bullet now points at aria-describedby instead of an aria-label, because an aria-label replaces the visible label as the field's name (WCAG 2.5.3).
  • Storybook. Textarea.vue sets aria-invalid="true" when invalid is set, and no attribute otherwise, like Otp.vue.

A disabled field can now darken its border on hover, at 0.5 opacity. The per-color :hover rules are atomic classes, so the disabled state can't cancel them without a wider change.

Related issue

None in this repository.

Type of change

  • 🐞 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that changes existing behavior)
  • 📖 Documentation
  • ♻️ Refactor / internal (no functional change)
  • 🔧 Build / tooling / CI

Checklist

  • My commits follow Conventional Commits with a package scope (e.g. feat(theme): …)
  • I ran pnpm build:nodocs && pnpm lint && pnpm typecheck && pnpm test and everything passes
  • I added a changeset (pnpm changeset) for changes to publishable packages, or this change only touches docs/storybook/app/playground/tests
  • I added or updated tests where relevant
  • I updated documentation where relevant
  • I did not edit generated files (dist/, .styleframe/)
  • My PR targets main and stays focused in scope

Notes / screenshots

What ran: pnpm build:nodocs, pnpm --filter @styleframe/theme test (3358 passed), pnpm typecheck, oxlint and oxfmt --check on the touched files, the Storybook build and vue-tsc -p tsconfig.app.json (18 errors, the same as main), pnpm build:docs and pnpm --filter @styleframe/docs test:build. The full pnpm lint and pnpm test didn't run, so that box stays unticked.

In the built Storybook, each disabled story (Textarea, Input, Input Date, OTP) computes cursor: not-allowed at the field's centre, the wrappers compute pointer-events: auto, and the disabled textarea computes resize: none. The Textarea Invalid story has aria-invalid="true" and Default has none.

🤖 Generated with Claude Code

The shared field surface set `pointer-events: none` on a disabled field,
which also hid its own `not-allowed` cursor. Drop it, give the nested
`.input-field` and `.textarea-field` a `:disabled` cursor, and keep a
disabled textarea's resize handle off with `resize: none`.

Update the Disabled passages on the Input, Input Date, OTP and Textarea
pages to match, point the Textarea addon advice at `aria-describedby`
instead of an `aria-label`, and set `aria-invalid` in the Storybook
Textarea.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
styleframe-dev Ready Ready Preview Oct 19, 2026 6:39am UTC
styleframe-dev-storybook Ready Ready Preview Oct 19, 2026 6:39am UTC

Request Review

…ssages

Credit the native `disabled` attribute with turning the resize handle
off, since the rule keys on `:disabled`, and say in the changeset that
the recipe no longer blocks clicks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alexgrozav alexgrozav self-assigned this Oct 19, 2026
@alexgrozav
alexgrozav marked this pull request as ready for review October 19, 2026 07:12
@alexgrozav
alexgrozav merged commit b2ced65 into main Oct 19, 2026
14 checks passed
@alexgrozav
alexgrozav deleted the field-disabled-cursor-uxf-372 branch October 19, 2026 07:12

This branch was successfully deployed

2 active deployments
Preview – styleframe-dev — 643e96b5 Deployed Oct 19, 2026 by vercel[bot]
Preview – styleframe-dev-storybook — 643e96b5 Deployed Oct 19, 2026 by vercel[bot]
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