Skip to content

Fix[Excerpt]: Preserve Focus During Generate and Regenerate Actions#698

Merged
dkotter merged 1 commit into
WordPress:developfrom
Infinite-Null:fix/excerpt-regenerate-focus-loss
Jun 11, 2026
Merged

Fix[Excerpt]: Preserve Focus During Generate and Regenerate Actions#698
dkotter merged 1 commit into
WordPress:developfrom
Infinite-Null:fix/excerpt-regenerate-focus-loss

Conversation

@Infinite-Null

@Infinite-Null Infinite-Null commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Closes: #697

What?

This PR fixes an accessibility issue where keyboard focus is lost when generating or regenerating an excerpt.

This change adds accessibleWhenDisabled to the generate and regenerate excerpt action buttons, allowing focus to be retained while the buttons are temporarily disabled.

Why?

Preserving focus during asynchronous actions provides a more accessible and predictable experience for keyboard and assistive technology users.

Before this change:

  • Focus was lost after generating or regenerating an excerpt.

After this change:

  • Focus remains on the action button.

Testing Instructions

  1. Create or open a post.
  2. Open the Post sidebar.
  3. Navigate to the excerpt section.
  4. Use the keyboard to activate the "Generate excerpt" button.
  5. Verify that focus remains on the button while the excerpt is being generated and after the action completes.
  6. Activate the "Regenerate excerpt" button.
  7. Verify that focus remains on the button while the excerpt is being generated and after the action completes.

Screenshots

Before

Screen.Recording.2026-06-11.at.1.44.28.PM.mov

After

Screen.Recording.2026-06-11.at.1.56.47.PM.mov
Open WordPress Playground Preview

@Infinite-Null Infinite-Null changed the title Fix[Excerpt]: Improve Focus Behavior During Generation Actions Fix[Excerpt]: Preserve Focus During Generate and Regenerate Actions Jun 11, 2026
@Infinite-Null Infinite-Null marked this pull request as ready for review June 11, 2026 08:30
@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: Infinite-Null <ankitkumarshah@git.wordpress.org>

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

@dkotter dkotter added this to the 1.1.0 milestone Jun 11, 2026
@dkotter dkotter merged commit 81b2aa4 into WordPress:develop Jun 11, 2026
39 of 44 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.

Focus is lost after generating or regenerating an excerpt

2 participants