Skip to content

Fix: Focus loss when generation buttons enter disabled state#611

Merged
dkotter merged 6 commits into
WordPress:developfrom
ishitaj34:fix/issue-589-3
May 26, 2026
Merged

Fix: Focus loss when generation buttons enter disabled state#611
dkotter merged 6 commits into
WordPress:developfrom
ishitaj34:fix/issue-589-3

Conversation

@ishitaj34
Copy link
Copy Markdown
Contributor

@ishitaj34 ishitaj34 commented May 22, 2026

What?

Part of #589

Why?

PR is necessary to retain visible focus indication when buttons enter disabled state during generation.

How?

Testing showed the primary user-facing issue in these cases was loss of visible focus indication during disabled states. Adding accessibleWhenDisabled preserves the visible focus indicator during generation.

  • Adds the accessibleWhenDisabled prop so focus is not lost while the button goes into disabled mode during generation.

Use of AI Tools

Testing Instructions

  • Alt Text Generation
    • Add an Image block and select an image.
    • Focus the "Generate Alt Text" button using keyboard navigation.
    • Trigger generation.
    • Verify focus is retained during generation.

Same for Excerpt and Featured Image generation.

Changelog Entry

Fixed - Focus loss when buttons enter disabled state during generation.

Open WordPress Playground Preview

@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ishitaj34 <ishitaj34@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.18%. Comparing base (3624c91) to head (e63b506).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #611   +/-   ##
==========================================
  Coverage      73.18%   73.18%           
  Complexity      1731     1731           
==========================================
  Files             85       85           
  Lines           7473     7473           
==========================================
  Hits            5469     5469           
  Misses          2004     2004           
Flag Coverage Δ
unit 73.18% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ishitaj34 ishitaj34 marked this pull request as draft May 22, 2026 16:52
@ishitaj34 ishitaj34 marked this pull request as ready for review May 22, 2026 19:31
@jeffpaul jeffpaul added this to the 1.1.0 milestone May 26, 2026
@dkotter dkotter merged commit ff2f9a8 into WordPress:develop May 26, 2026
32 of 34 checks passed
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.

3 participants