Skip to content

Latest Posts: Read more links have identical text and ignore excerpt_more filter from themes #55026

@sabernhardt

Description

@sabernhardt

Description

When #51190 matched the front end to the editor, instead of matching the editor to the front end, it created two problems:

  1. All "Read more" links in the block have identical text, which goes against accessibility guidelines.
  2. By using the excerpt_more hook, on the standard priority, this replaces filters that themes have used to add custom unique links in place of the ellipsis. That includes the bundled themes from Twenty Thirteen to Twenty Nineteen and Twenty Twenty-One.

Related: Trac 59409

Step-by-step reproduction instructions

  1. Create several posts, each with a few paragraphs of text.
  2. Add a Latest Posts block, either in a template or within the content of a page. In the sidebar, toggle the Post content on and show the Excerpt.
  3. Activate Twenty Twenty-Three and visit a page with that Latest Posts block.
  4. Observe that the post excerpts end with the ellipsis (…) and "Read more" links.
  5. Check the text of the "Read more" links, and note that their accessible names are identical to each other. (You could inspect each element, or you might access the list of links with a screen reader or in a tool such as the WAVE browser extension.)
  6. Activate Twenty Twenty-One and return to the page you visited earlier.
  7. Check the text of "Read more" links again. With WordPress 6.2, these links showed "Continue reading" and included the post title as screen-reader-only text. In WordPress 6.3, that was replaced with the ellipsis and "Read more" links.

Screenshots, screen recording, code snippet

Twenty Twenty-Three had the bracketed ellipsis in WordPress 6.2

ellipsis without a link

WordPress 6.3 added "Read more" links to each post excerpt

'Read more' links with Twenty Twenty-Three

Twenty Twenty-One's "Continue reading" links applied to the post excerpts with the Latest Posts block in WordPress 6.2

'Continue reading' links

WordPress 6.3 replaced the theme's text with "Read more" links

'Read more' links with Twenty Twenty-One

Environment info

WordPress 6.3, with or without Gutenberg 16.7.0

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions