Skip to content

fix: stop submit button from dropping keyboard focus on submit#1230

Open
misrasamuelisiguzor-oss wants to merge 1 commit into
solutions-plug:mainfrom
misrasamuelisiguzor-oss:fix/submit-button-disables-itself-while-focused-drop
Open

fix: stop submit button from dropping keyboard focus on submit#1230
misrasamuelisiguzor-oss wants to merge 1 commit into
solutions-plug:mainfrom
misrasamuelisiguzor-oss:fix/submit-button-disables-itself-while-focused-drop

Conversation

@misrasamuelisiguzor-oss

Copy link
Copy Markdown

closes #1164
closes #1165
closes #1166
closes #1167

Newsletter submit button used the native disabled attribute, which browsers unfocus automatically. Since isLoading flips synchronously in handleSubmit, a keyboard/screen-reader user's focus was silently dropped to right after submitting. Switch to aria-disabled and guard against re-submission in handleSubmit instead, so the button stays focusable and keyboard focus never moves unexpectedly.

Description

Type of Change

  • Bug fix
  • New feature
  • Refactor / code cleanup
  • Documentation update
  • CI / tooling change
  • Breaking change

Testing Done

Bundle Size

Chunk Before After
vendor.js
main*.js
pages/_app*.js

Checklist

  • Tests pass locally
  • Documentation updated (if applicable)
  • No breaking changes, or breaking changes are documented above
  • If you added or changed an API endpoint, regenerated the OpenAPI spec and committed the result:
    cd services/api && cargo run --bin generate-openapi > openapi.yaml
    git add openapi.yaml && git commit -m "chore: regenerate openapi.yaml"
  • If you changed system architecture (new service, database, external dependency, or network boundary), updated docs/architecture.md
  • Bundle size checked (if frontend changes)

Related Issues

Closes #

Newsletter submit button used the native disabled attribute, which
browsers unfocus automatically. Since isLoading flips synchronously in
handleSubmit, a keyboard/screen-reader user's focus was silently
dropped to <body> right after submitting. Switch to aria-disabled and
guard against re-submission in handleSubmit instead, so the button
stays focusable and keyboard focus never moves unexpectedly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@misrasamuelisiguzor-oss Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment