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

Several blocks are missing has-link-color class on the front #47233

Closed
carolinan opened this issue Jan 18, 2023 · 3 comments · Fixed by #47357
Closed

Several blocks are missing has-link-color class on the front #47233

carolinan opened this issue Jan 18, 2023 · 3 comments · Fixed by #47357
Assignees
Labels
[Block] Post Terms Affects the Post Terms Block [Type] Bug An existing feature does not function as intended

Comments

@carolinan
Copy link
Contributor

carolinan commented Jan 18, 2023

Description

When the post terms block has a link color set, the has-link-color class is present in the editor and not the front.

This is causing a problem for https://core.trac.wordpress.org/ticket/56487, enabling appearance-tools theme support for bundled themes.

In Twenty Twenty-One the link color contrast is meant to change depending on the background color, unless there is a custom link color set, so it relies on this class being present in both the editor and front.

Update: This is also the case with

  • post author
  • post date
  • latests posts block
  • calendar
    I have not had the chance to test all blocks that has link color options yet.

Step-by-step reproduction instructions

In the editor, add a post terms block.
Select a link color from the color picker.
View the source for the block in the editor and confirm that it has the has-link-color class.
Save and view the front. Confirm that the block no longer has the has-link-color class.

Screenshots, screen recording, code snippet

No response

Environment info

Gutenberg trunk
WordPres 6.2 alpha.
Twenty Twenty-One.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@carolinan carolinan added the [Block] Post Terms Affects the Post Terms Block label Jan 18, 2023
@carolinan carolinan changed the title Post terms is missing has-link-color class on the front Several blocks are missing has-link-color class on the front Jan 18, 2023
@carolinan carolinan added the [Type] Bug An existing feature does not function as intended label Jan 18, 2023
@carolinan
Copy link
Contributor Author

carolinan commented Jan 18, 2023

@ramonjd
Hi!
The list of blocks in this issue are dynamic blocks that has block support for link colors, but are missing the has-link-color class name on the front.
It needs to be unblocked to repair problems with one of the accessibility features in Twenty Twenty-One.

I am not up to date with what is planned for these class names: am I now expected to update the block's php file using the WP_HTML_Tag_Processor?
Or do I add the class "manually", while work continues on the style engine?

Is the gallery block and heading block the best references for learning about the tag processor?

@carolinan carolinan self-assigned this Jan 18, 2023
@carolinan
Copy link
Contributor Author

Since the tag processor will not be in 6.2, this is unblocked and I will start working on adding the classes manually.

@carolinan
Copy link
Contributor Author

carolinan commented Jan 24, 2023

These blocks are more relevant for block themes but are all missing the has-link-color on the front:

comment author name
comment content
comment date
comment edit link
comment reply link
comments pagination
post comments form
post comments link

post template
post title
post author name
post excerpt

query no results
query pagination

site title

term description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Terms Affects the Post Terms Block [Type] Bug An existing feature does not function as intended
Projects
Development

Successfully merging a pull request may close this issue.

1 participant