Skip to content

fix: improve accessibility of number input spinner controls#824

Open
Ram-sah19 wants to merge 8 commits into
magic-peach:mainfrom
Ram-sah19:fix-css-solution
Open

fix: improve accessibility of number input spinner controls#824
Ram-sah19 wants to merge 8 commits into
magic-peach:mainfrom
Ram-sah19:fix-css-solution

Conversation

@Ram-sah19
Copy link
Copy Markdown

** Description**

This pull request improves the usability and accessibility of native number input fields by making browser-provided increment/decrement spinner controls consistently visible across supported browsers and devices.

Previously, WebKit-based browsers only displayed spinner arrows when the input was hovered or focused, which reduced discoverability and negatively impacted touch-device usability.


Problem

Native number inputs in Chromium/WebKit browsers (::-webkit-inner-spin-button and ::-webkit-outer-spin-button) default to hidden or low-opacity states until hover/focus interaction occurs.

This caused several UX issues:

  • Spinner controls were invisible on touch/mobile devices where hover interactions do not exist
  • Users could miss the availability of increment/decrement functionality
  • Accessibility and discoverability of numeric controls were reduced

Affected areas included:

  • Trim start/end inputs
  • Custom width/height preset inputs
  • Any shared numeric configuration field

Solution

A lightweight global CSS enhancement was added in src/app/globals.css.

The implementation:

  • Targets WebKit spin button pseudo-elements

  • Forces spinner controls to remain visible using:

    opacity: 1 !important;
  • Preserves native browser behavior and accessibility

  • Avoids introducing custom input implementations or additional TSX logic

This keeps the solution:

  • Minimal
  • Maintainable
  • Cross-component compatible
  • Mobile-friendly

Changes Included

  • Added global visibility overrides for:

    • ::-webkit-inner-spin-button
    • ::-webkit-outer-spin-button
  • Improved discoverability for:

    • Trim Controls
    • Custom Output Size inputs
    • Other reusable number inputs

Testing

Steps to Verify

  1. Run the application locally:

    npm run dev
  2. Navigate to:

    • Trim controls
    • Custom video preset dimensions
  3. Observe the number input fields without hovering.

Expected Result

  • Spinner arrows remain visible at all times
  • Inputs retain native browser functionality
  • Controls are usable on desktop and mobile devices
  • Accessibility and discoverability are improved

Accessibility Impact

  • Improves visibility of numeric input affordances
  • Enhances mobile usability where hover is unavailable
  • Preserves native keyboard and assistive technology support

Closes #798

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

@Ram-sah19 is attempting to deploy a commit to the magic-peach1's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @Ram-sah19!

Welcome to Reframe — a browser-based video editor built for everyone 🎬

What happens next

  1. 🤖 Automated checks — build & TypeScript typecheck will run automatically
  2. Vercel preview — a preview deployment will be created (requires maintainer authorization for fork PRs)
  3. 👀 Code review — a maintainer will review your changes
  4. 🚀 Merge — once approved, your PR will be merged!

Quick checklist

  • PR title follows Conventional Commits (e.g. feat: add dark mode)
  • Linked the issue this PR closes (e.g. Closes #123)
  • Tested the changes locally (bun run dev)
  • Build passes (bun run build)

Useful links

Happy coding! 🎉

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

✅ PR Format Check Passed — @Ram-sah19

Basic format checks passed. A maintainer will review your code changes.

This does not mean the PR is approved — it just means the format is correct.

@github-actions github-actions Bot added level:advanced Advanced level - 55 pts type:design UI/UX design type:feature New feature labels May 20, 2026
@Ram-sah19 Ram-sah19 changed the title ux: make number input spinner arrows consistently visible for accessibility fix: improve accessibility of number input spinner controls May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:advanced Advanced level - 55 pts type:design UI/UX design type:feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] UI Improvement Suggestion: Spinner Buttons Visibility

1 participant