1 hour ago · Tech · hide · 0 comments

I'm a little behind and just realized that Bear blog now gives users the option to add a Previous and Next to a blog post template. This allows readers to navigate to your Previous or Next blog post without having to go back to your Archive / Blog list. If you have been using this, you may have noticed that these only render the literal words "Previous" and "Next". It doesn't come with any context or post title. I wanted something that gives a little bit of context to that link, specifically the actual post title1. If you look closely, those actually render as: <a class="previous-post" href="/your-last-post" title="Title of your last post">Previous</a> <a class="next-post" href="/your-next-post" title="Title of your next post">Next</a> This helps because that means we can get the Post title from this! The post title is in the title attribute of the link, just not visible automatically. Screen readers are able to pick it up, but you just can't see it in the UI. Displaying the Post…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.