Make WordPress Core

Opened 7 weeks ago

Closed 4 weeks ago

Last modified 3 weeks ago

#66201 closed defect (bug) (fixed)

Patterns: Post title link color in "Large title" pattern renders invisible in some themes

Reported by: sakshamsharma5 Owned by: mikachan
Priority: normal Milestone: 7.2
Component: Editor Version: trunk
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

When inserting the Core pattern "Large title" (core/query-large-title-posts), post title links render invisible (dark text on a #000000 background) in themes like Twenty Twenty-Four, Twenty Twenty-Two and Ipsum.
This happens because the Post Title block within the pattern uses the legacy/unsupported syntax "color": { "link": "#ffffff" } instead of the Elements API ("elements": { "link": { "color": { "text": "#ffffff" } } }). As a result, the link color is ignored and falls back to theme defaults.

Steps to Reproduce

  1. Activate one of the following themes: Twenty Twenty-Four, Twenty Twenty-Two or Ipsum .
  2. Create a new post or page.
  3. Insert the pattern: Patterns > Posts > Large title.
  4. Notice that the post title links are not visible against the black background.

Expected Behavior

Post title links should render white (#ffffff) as intended by the pattern.

Change History (4)

This ticket was mentioned in ​PR #13793 on ​WordPress/wordpress-develop by ​@sakshamsharma5.


7 weeks ago
#1

  • Keywords has-patch added

Description

Fixes an issue where post title links in the Core pattern "Large title" (core/query-large-title-posts) blend into the #000000 background in themes like Twenty Twenty-Four, Twenty Twenty-Two and Ipsum.
Updates the Post Title block attributes to use the Elements API ("elements": { "link": { "color": { "text": "#ffffff" } } }) instead of the obsolete "color": { "link": "#ffffff" }.

Trac ticket: https://core.trac.wordpress.org/ticket/66201

Use of AI Tools

AI assistance: Yes
Tool(s): Antigravity
Model(s): Gemini
Used for: Diagnosing and identifying the root cause; final implementation and tests were reviewed and edited by me.

#2 @mikachan
4 weeks ago

  • Owner set to mikachan
  • Resolution → fixed
  • Status new → closed

In 64579:

Editor: Fix link color in the "Large title" query pattern.

The Post Title block in the core/query-large-title-posts pattern set its link color with the old style.color.link attribute, which the block no longer supports. The setting was ignored, so the title links took the theme's link colour. In themes such as Twenty Twenty-Two and Twenty Twenty-Four, that made the titles nearly invisible on the pattern's dark background.

This changeset moves the link colour to style.elements.link.color.text, the Elements API attribute, so the titles show as intended.

Props sakshamsharma5, onemaggie.
Fixes #66201.

This ticket was mentioned in ​Slack in #accessibility by ravi. ​View the logs.


3 weeks ago

#4 @sabernhardt
3 weeks ago

  • Milestone Awaiting Review → 7.2
Note: See TracTickets for help on using tickets.