Problem/Motivation

When the Generate request fails in the browser (network error or non-2xx), the button comes back and the message is only announced to screen readers. A sighted editor sees nothing.

Steps to reproduce

  1. Open a generator form.
  2. Make the request fail, for example by going offline.
  3. Click Generate.

Proposed resolution

Show the same message on the page next to the description, as the server-side error does.

Remaining tasks

  • ✅ File an issue
  • ❌ Addition/Change/Update/Fix
  • ❌ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ✅ Update Release Notes
  • ✅ Release

User interface changes

  • Before (1.0.x): a failed Generate request shows nothing on the page.
     a failed Generate request shows nothing on the page.
  • After: the error shows below the description.
     the error shows below the description.

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A

AI-Generated: Yes

Issue fork ai_media-3634859

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes
StatusFileSize
new60.86 KB
new62.87 KB

  • rajab natshah committed db580ef7 on 1.0.x
    fix: #3634859 Show an error on the page when the Generate request fails
    
rajab natshah’s picture

Issue summary: View changes
Status: Active » Fixed
Issue tags: +ai_media-1.0.0-rc1

✅ Released ai_media-1.0.0-rc1

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.