-
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
[ New Inline Format ] Introduce Inline Time Format for improved SEO and accessibility #67751
base: trunk
Are you sure you want to change the base?
[ New Inline Format ] Introduce Inline Time Format for improved SEO and accessibility #67751
Conversation
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.
@sarthaknagoshe2002 Thanks for the PR!
The important point here is that generating the datetime
attribute from a selected string can be difficult:
- The user won't necessarily enter the correct date and time according to the ISO format.
- The text won't necessarily be in English. For example,
14:00 UTC +5:30 15th December 2024
will become2024年12月15日 14時(UTC+5:30)
in Japanese.
Given that, I think it would be better for the user to explicitly select the date and time, like so:
@t-hamano Noted, on it! |
@t-hamano I’ve implemented the picker as advised. Could you please take a look? |
Partial Fix for : #54488
What?
This PR introduces a Time Inline Format to display time or date information with machine-readable formatting using the
<time>
element.Why?
The
<time>
element with thedatetime
attribute improves machine-readability, providing better SEO and more accurate metadata for search engines.While similar functionality exists in core blocks like Post Date or Latest Comments, these options are tied to specific content. This new feature allows inline time representation without creating additional content types.
How?
<time>
formatting within text, like in a Paragraph block.datetime
attribute.Testing Instructions
Screenshots or screencast
Inline.time.format.mov