-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix: Page list: Pages without a title has no link text #64297
Conversation
Add a condition that displays the page id and (no title) if the page is missing a title. This solves a problem with the link and button text being empty when the title is missing.
…sts. Posts in the navigation block that does not have titles, do not include the post ID in the link text. For consistency, I am removing the ID from the page title placeholder.
Add a placeholder with the text (no title) to the editor side of the page list block, when a page has no title.
Size Change: +7 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach seems reasonable to me 👍
Because it takes into account the case where the title is empty in the Latest Comments, Latest Posts, and RSS blocks.
I will approve this PR, but I think it would be better to address this suggestion.
While not directly related to this PR, I noticed that there are some places where the title doesn't show anything if it contains only spaces. For example, the title when a post is being edited:
It might be worth investigating these as well and addressing them in a new PR.
Thank you. |
Add placeholder title to the page list block, that shows when the page is missing a title. Co-authored-by: carolinan <poena@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
What & Why?
This PR adds two placeholder texts when a page is in a page list block, and the page is missing a title.
The text is
(no title)
, which matches the placeholder for posts, and the placeholder for pages that are not inside a page list.Without a placeholder title, the link text and button was empty, making the item difficult to see and use. Visually, there was only a blank space and no visible item for a sighted user to click on or navigate to.
Closes #54959
How?
The PR adds one placeholder title to the editor, and one to the front.
Testing Instructions
Screenshots or screencast
After: The screenshot shows a navigation block with a page list inside.
A second page list block is also below (outside) the navigation block.