How to Restore the Link Title Attribute Removed in WordPress 4.2
WordPress 4.2 – aka Powell – rolled off the production line back in April with a number of new features designed to make the lives of its users easier.
One small change that slipped through in the release has caused something of a minor kerfuffle however – the removal of the link title attribute in the post editor.
In this article we’ll show you how to restore that functionality but also – perhaps more importantly – cover why it might be a better idea not to.
Some Background on the Removal of the Link Title Attribute
The link title attribute is one of those features that has been kicking around WordPress so long it has probably long since slipped onto the list of platform features you barely even notice anymore.
Before we go any further, let’s quickly clarify what its removal actually means. Prior to version 4.2, adding a link in the post editor would automatically give you the option of filling in the link title attribute.
Upgrade to 4.2 and our title attribute option is mysteriously vanished, replaced with an option to edit the link text itself.
Browsing through the list of highlights of the 4.2 release, there’s little mention of any changes to do with the link title attribute.
Even a quick shuffle through the 609 tickets closed in Trac as part of the 4.2 release doesn’t throw up anything obviously related to its disappearance.
“Just to give you a more complete answer:
The ‘Title’ field was intentionally removed from the wpLink modal in #28206 largely because it was often confused with the actual link text itself.
In recent years, we’ve begun to actively discourage the use of title attributes in links as they are largely useless outside of providing the “hover tooltip” many visual users enjoy, and more importantly, they don’t promote good accessibility.
If you’d like to continue using title attributes in links, you can add them manually using the Text mode in the editor.”
So, it turns out that Ticket #28206 – the breezily titled Include ‘source anchor’ in wpLink quicktags modal for improved ui/ux – is the culprit here.
As WP Tavern’s Jeff Chandler – whose article on the subject first drew it to my attention – pointed out, some of the subsequent commentary in the bug report revealed a level of lingering confusion about the utility or otherwise of link titles in general.
I have to confess, this is an area that I myself had never fully investigated in detail. I’d also just sort of assumed that including a link title was somehow best practice and left it at that.
Jaynes’ comments, however, very much indicate otherwise.
So, what’s really going on here? Let’s look at the cases for and against the humble link title attribute.
The Case for the Link Title Attribute
As I began to dig into this, I fully expecting to come across a whole host of valid reasons for including the title attribute in all links. I was surprised to find out it is basically a one-item long list:
- The title attribute can be useful for giving contextual information to users in a visual manner.
Sensible uses of this are everywhere to be seen in WordPress itself of course.
That really is about all that can be said on the positive side of the equation though.
Any rumors of supposed SEO benefit are extremely hard to substantiate and the consensus seems to be that title attribute info is not a significant ranking factor.
It appears nowhere on the latest SEO Cheat Sheet from SEO sites for example, though Brian Dean over at Backlinko does list it as a weak relevancy signal.
However, there’s a little more to chew on when we move on to the negative side of things.
The Case Against the Link Title Attribute
Drew Jaynes’ comment that title attributes “don’t promote good accessibility” was fleshed out considerably a number of years ago in articles from both David Ball and Steve Faulkner – both well worth a few minutes of your reading time.
The overall list of problems can be boiled down to the following points:
- Useless on Touch Devices: Mobile browsing is scorching past desktop use at an alarming rate and crossed the tipping point as long ago as 2013. The title attribute is effectively useless on all touchscreen mobile devices.
- Not used by majority of screenreaders: I’d always assumed the title attribute was an accessibility plus point but, as David Ball shows, it is very rarely read by screenreaders and can even be an accessibility problem in its own right.
- Not recommended by standards bodies: The World Wide Web Consortium explicitly advises against use of the title attribute.
- Not recommended by independent accessibility experts: As David Ball’s article makes clear, experts such as Jeffrey Zeldman and Bruce Lawson (of HTML5 Doctor fame) advise against it.
Restoring the Previous Functionality
If you remain unconvinced by any of the above – and can’t face wading into Text mode to add attributes manually – help is at hand in the form of the Restore Link Title Field plugin from Sergey Biryukov and Samuel Wood.
It does pretty much exactly what you’d expect it to. Install the plugin and the previous functionality will be back the way you are used to seeing it in WordPress 4.1.
WordPress is Always Evolving
Change is the only constant when you are dealing with a system of WordPress’ size and complexity.
Every now and then, aspects of that change are bound to ruffle a few feathers in terms of people having to adjust their workflow.
Previous examples of relatively minor changes that caused some initial consternation include: changes to image border and padding options in WordPress 3.9, the distraction-free writing mode introduced in WordPress 4.1, and of course the capitalization imbroglio all the way back in WordPress 3.0.
For me, the topic of the link title attribute’s removal highlighted a few points about the platform itself:
- As the response to the initial bug report shows, development is genuinely public and open these days and takes place within a highly structured environment.
- No matter how long you’ve been using WordPress, there’s always something new to learn, even with an element as fundamental as the hyperlink.
- The open and extensible nature of WordPress means that even if something does change, the option to revert in some way via a plugin is always likely to emerge.
The average user will be unlikely to want to delve into the innards of Trac in order to keep pace with proposed changes to the platform, but it is worth bookmarking the following links to keep an eye on future features coming down the pipeline:
- How the WordPress project is organized and how the release cycle works.
- Upcoming features planned for integration into core.
- The official WordPress roadmap.
For those looking for a bit more background, there’s also a great interview with Drew Jaynes over on WordPress Weekly that goes into a lot of detail on how a development cycle feels from the inside.
Though not widely flagged as part of the 4.2 release, the removal of the link title attribute makes sense once you start digging into the rationale behind its disappearance.
The post editor can feel cluttered at the best of times so any streamlining is always welcome.
We’re curious to hear your thoughts on the removal of this particular piece of functionality, as well as your impressions of WordPress 4.2 as whole now that it has been out for a little while.