Make WordPress Core

Opened 5 months ago

Closed 5 months ago

Last modified 3 weeks ago

#64947 closed defect (bug) (invalid)

Duplicate "Regenerate Alt Text" button appears in Block Editor sidebar when navigating between blocks - WordPress 7.0 RC1

Reported by: torontodigits Owned by:
Priority: normal Milestone:
Component: Editor Version: 7.0
Severity: normal Keywords: has-screenshots close
Cc: Focuses: ui, accessibility, javascript, administration

Description

While testing the Block Editor in WordPress 7.0 RC1, a UI issue was observed where the "Regenerate Alt Text" button appears multiple times in the right sidebar.

This occurs when navigating between different blocks, particularly when switching in and out of Image blocks. The button is duplicated instead of being rendered once per block selection.

Steps to Reproduce

  1. Open the Block Editor for a post or page.
  2. Insert or select an Image block.
  3. Navigate between different blocks (e.g., Paragraph → Image → Paragraph → Image).
  4. Observe the right sidebar (Block settings panel).

Expected Behavior

Only one "Regenerate Alt Text" button should be displayed for the selected Image block.

Actual Behavior

Multiple "Regenerate Alt Text" buttons are displayed in the sidebar.

Additional Notes

  • This may be caused by improper component unmounting or repeated rendering when switching between blocks.
  • The issue persists during the same editing session once triggered.

Environment

  • WordPress: 7.0 RC1
  • Editor: Block Editor (Gutenberg)
  • Browser: Microsoft Edge & Google Chrome
  • OS: Windows 11

Attachments

  • Screenshot showing duplicate buttons
  • Screencast video demonstrating the issue

You may find screenshot & screencast on this link: https://drive.google.com/drive/folders/1w2mjSUQQtKW82riiCaruckMsnz8lZ4eX

Attachments (1)

Duplicate Regenerate Alt Text button appears in Block Editor sidebar when navigating between blocks.png (716.9 KB ) - added by torontodigits 5 months ago.
Duplicate "Regenerate Alt Text" button appears in Block Editor sidebar when navigating between blocks

Download all attachments as: .zip

Change History (4)

@torontodigits
5 months ago

Duplicate "Regenerate Alt Text" button appears in Block Editor sidebar when navigating between blocks

#1 @sabernhardt
5 months ago

  • Keywords reporter-feedback added; needs-patch has-test-info removed

Hi and welcome to WordPress Core Trac!

Please identify which plugin you use for the AI alternative text generation. There are multiple matches in the plugin directory. The issue likely should be reported to the plugin author.

Also, the pattern in the screenshot and video is 'Offset images with descriptions', which supplies the alt text for both of its images.

#2 @torontodigits
5 months ago

  • Keywords close added; reporter-feedback removed
  • Resolutioninvalid
  • Status newclosed

@sabernhardt good catch! Its Open AI plugin & best place is to report on respective [Github repo]https://github.com/WordPress/ai-provider-for-openai.

#3 @sabernhardt
3 weeks ago

  • Milestone Awaiting Review

Thanks for moving the report to GitHub!

This was addressed in the AI plugin:
https://github.com/WordPress/ai/pull/356

Note: See TracTickets for help on using tickets.