Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group blocks alt text showing [object Object] #96079

Closed
xavier-lc opened this issue Nov 5, 2024 · 9 comments · Fixed by Automattic/jetpack#40275
Closed

Group blocks alt text showing [object Object] #96079

xavier-lc opened this issue Nov 5, 2024 · 9 comments · Fixed by Automattic/jetpack#40275
Assignees
Labels
[Feature] Core Blocks Blocks that come with Gutenberg. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. Groundskeeping Issues handled through Dotcom Groundskeeping rotations [Pri] High Address as soon as possible after BLOCKER issues [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts Triaged To be used when issues have been triaged. [Type] Bug

Comments

@xavier-lc
Copy link
Contributor

Quick summary

On the page editor, creating a group block shows javascript instead of te proper text when hovering the group types. That's because the aria-label attribute is not properly set.

Image
Image
Image
Image

Steps to reproduce

  1. Go to /wp-admin/post-new.php?post_type=page
  2. Choose Blank page
  3. Type / to choose a block
  4. Choose Group
  5. Confirm that hovering the group types shows [object Object]

What you expected to happen

The group type description should be shown instead.

What actually happened

The group types shows [object Object]

Impact

All

Available workarounds?

No but the platform is still usable

If the above answer is "Yes...", outline the workaround.

No response

Platform (Simple and/or Atomic)

No response

Logs or notes

No response

@xavier-lc xavier-lc added [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Feature] Core Blocks Blocks that come with Gutenberg. [Product] WordPress.com All features accessible on and related to WordPress.com. [Type] Bug Needs triage Ticket needs to be triaged labels Nov 5, 2024
@github-actions github-actions bot added [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts [Pri] High Address as soon as possible after BLOCKER issues labels Nov 5, 2024
@phcp phcp self-assigned this Nov 6, 2024
@phcp phcp moved this from Needs Triage to In Triage in Automattic Prioritization: The One Board ™ Nov 6, 2024
@phcp
Copy link
Contributor

phcp commented Nov 6, 2024

@xavier-lc, I couldn't reproduce it here. I tried on atomic and self-hosted sites, and they displayed the alt text correctly. Is there any specific scenario where this issue happens?

Image

@xavier-lc
Copy link
Contributor Author

@phcp huh, that's weird, I've just reproduced it on an atomic and simple site with the Chrome browser. As I mentioned on the description, I've seen it when creating a new page.

@phcp
Copy link
Contributor

phcp commented Nov 6, 2024

@phcp huh, that's weird, I've just reproduced it on an atomic and simple site with the Chrome browser. As I mentioned on the description, I've seen it when creating a new page.

Indeed, I just noticed that the atomic site I was testing is broken. I could see the error on other sites.

📌 RESULTS

  • Could reproduce with simple sites and atomic sites.
  • Could reproduce while editing posts or pages.
  • Couldn't reproduce it on a self-hosted site using the same Gutenberg version.
  • Tested with different locales and had the same issue.

📌 FINDINGS

  • The last element is still being displayed correctly.
  • Translations are working correctly, but the variation descriptions are somehow changed to react elements at some point. The string that should be displayed is inside the object as the prop children, but it's unclear where it happens.

Image

📌 ACTIONS

  • Triaged.
  • Keep it as High priority since it breaks accessibility and can be annoying to the users

@phcp phcp added Triaged To be used when issues have been triaged. Groundskeeping Issues handled through Dotcom Groundskeeping rotations and removed Needs triage Ticket needs to be triaged labels Nov 6, 2024
@phcp phcp moved this from In Triage to Triaged in Automattic Prioritization: The One Board ™ Nov 6, 2024
@phcp phcp removed their assignment Nov 6, 2024
@andregardi
Copy link
Contributor

andregardi commented Nov 12, 2024

I investigated that today, but not much luck.
I setup locally an older version of Calypso. I reset it to (#85758) the first merged PR of the year on January 1. Still got to reproduce the bug, which is enough evidence for me that this is not calypso related.

At https://github.com/WordPress/gutenberg, there is the block editor live demo in which I could not reproduce the bug. So, at a first look, does not seem to be related with Gutenberg.

I tried self hosted WordPress and got the same results as Paulo.
Even putting it through jurassic tube and accessing the site under wordpress.com, I was not able to reproduce the issue.

I also checked that translations for Arrange blocks vertically, Arrange blocks horizontally and Gather blocks in a container are not new to this version. I see this terms used on the js file at least from v18.0.0, the oldest plugin version we still keep on sandbox.

@dsas dsas self-assigned this Nov 18, 2024
@dsas
Copy link
Contributor

dsas commented Nov 18, 2024

I can't repro on a Jurassic Ninja site with the GB plugin activated. I'll try and debug on dotcom.

@dsas
Copy link
Contributor

dsas commented Nov 18, 2024

Translations are working correctly, but the variation descriptions are somehow changed to react elements at some point. The string that should be displayed is inside the object as the prop children, but it's unclear where it happens.

It happens in Jetpack-mu.

The "extra" props listed there with the descriptions: link and postId are part of blockInfoWithVariations. You can see that the grid variation works fine, and in your screenshot of the props, its description is a string rather than a ReactElement. It's also not mentioned in that file.

The description is transformed into a "Learn More" which replaces the original description..

This transformed "Learn More" description is intended to be used in the sidebar as a nice help link to learn more about the block, but obviously that won't work for the variations placeholder 🤔

Image

@dsas
Copy link
Contributor

dsas commented Nov 18, 2024

Bah, I tried to see if this was always a problem, and it appeared that I reviewed the PR that added the links.

@BogdanUngureanu, can you remember if we looked at the variations placeholder on the initial PR? I'm guessing from the test instructions it was an oversight, but if not, then it might help track down when this stopped working.

@BogdanUngureanu
Copy link
Contributor

@dsas Sorry, I don't remember if we looked at the placeholders. :(

@dsas
Copy link
Contributor

dsas commented Nov 19, 2024

Following on from my previous comment explaining that this is due to dotcom's "Block guide" support link in descriptions.

To resolve this issue I'm planning to undo the change which added the support links for group, row and stack blocks only :( cc @donalirl .

For all of the other blocks, we're arguably living on borrowed time and searching for those blocks is already broken.

If these links are important (my assumption is that they are very useful), then the correct thing to do is firstly, demonstrate the importance of this with Gutenberg, and secondly to work with them on a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Core Blocks Blocks that come with Gutenberg. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. Groundskeeping Issues handled through Dotcom Groundskeeping rotations [Pri] High Address as soon as possible after BLOCKER issues [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts Triaged To be used when issues have been triaged. [Type] Bug
Development

Successfully merging a pull request may close this issue.

5 participants