#24203 closed defect (bug) (fixed)
Remove the_title_attribute() from anchors with the_title() as text
Reported by: | nacin | Owned by: | lancewillett |
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Bundled Theme | Keywords: | has-patch needs-codex |
Focuses: | Cc: |
Description
This:
<a href="(link)" title="Permalink to Post Title">Post Title</a>
is redundant. It is an anachronism from earlier themes that does nothing for accessibility, search engines, or general users, and if anything, harms all of the above.
We should remove the_title_attribute() whenever the anchor text is the_title().
More: http://make.wordpress.org/accessibility/2013/04/23/post-titles-in-attributes/
Patch for four bundled themes incoming.
Attachments (1)
Change History (13)
#3
@
11 years ago
It's harmful in two instances:
- One, useless tooltips are a big turn-off. It's one of the reasons we got rid of tooltips for images by default in 3.5. Almost every time, the tooltip was going to be one of three things: the caption (redundant), the alt text (misapplied and redundant), or "IMG_5678" which was one of the lamest things in WordPress. You hover over a title that says "Permalink to (title)" and you just know you're on a WordPress site. My point is it isn't just code cruft, it is cruft that the user sees too.
- More so, it is definitely harmful when it comes to accessibility. There is a long-standing, strong opinion in the accessibility community (a little bit on the make thread I linked to) that title attributes are terrible and useless. They are either ignored by screen readers, or double-read by screen readers. They can also pose a problem for dyslexic users. Experts have outlined a number of other issues with them, and the HTML5 spec actively discourages them.
#4
@
11 years ago
- Keywords 2nd-opinion removed
Confirmed with research—and a sanity check from @themeshaper—that this has been around since "default" (Kubrick, see r2012) and has been passed along to each default theme since then. I didn't find an initial reasoning for it, and I think it's safe to remove based on the arguments present above.
Noted, and thanks for the ticket and patch. I'd like to think this through a bit before committing, including a look back at where it came from and what it's intended purpose was in the beginning.
I don't think I'd go as far as to say it's harmful, but fully agree it looks like cruft at this point and it would be a nice to clean it up.