Make WordPress Core

Opened 11 years ago

Closed 9 years ago

Last modified 7 years ago

#26551 closed defect (bug) (fixed)

Remove title attributes: link-template.php

Reported by: joedolson's profile joedolson Owned by:
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: Permalinks Keywords: title-attribute
Focuses: accessibility Cc:

Description (last modified by SergeyBiryukov)

Related: #24766

// link-template.php

Change History (11)

#1 @SergeyBiryukov
11 years ago

  • Description modified (diff)

#2 @joedolson
11 years ago

These have mostly been resolved. get_adjacent_post_rel_link() is a valid use of the title attribute (in a <link> element), most others have been removed.

The title attribute use in the_shortlink() is somewhat valid, since it does provide more information about the link. And, since the_shortlink() is used in themes, adding screen reader text is perhaps problematic, since we can't guarantee that styles are applied for that.

My feeling is that this is less than ideal, but I don't really have an alternate suggestion. Themes can implement this in a more accessible manner, according to their own methods by replacing the link text, since this is readily filterable. Probably should just be left as is, but I'm open to second opinions with another idea.

#3 @nacin
11 years ago

  • Component changed from Accessibility to Permalinks
  • Focuses accessibility added

#4 follow-up: @obenland
10 years ago

Was this fixed in r25570?

#5 @wonderboymusic
10 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

#6 in reply to: ↑ 4 @GaryJ
9 years ago

Replying to obenland:

Was this fixed in r25570?

There's still a title attribute in the_shortlink(). The default value for this is the sanitized post title, which is different to the default anchor text. This means, by default, it's not redundant.

#7 @GaryJ
9 years ago

  • Keywords close added; needs-patch removed

Having chatted with Rian at WCLDN, we agree with Joe - the title attribute on the shortlink can be left in. It's not a hinderance to screen readers, and the default anchor text of "This is a shortlink" is more descriptively helpful than replacing that content with the post title.

The question, from a non-accessibility view, might be whether the tooltip is sufficiently helpful for visual readers or not? If not, then for consistency with other links and to therefore match user expectations, the attribute should be removed.

This ticket was mentioned in Slack in #accessibility by garyj. View the logs.

9 years ago

#9 @joedolson
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

I'm comfortable with closing this and letting it stand as is. If we come up with some alternative in the future, we can handle this then.

#10 @DrewAPicture
9 years ago

  • Keywords close removed
  • Milestone changed from Future Release to 3.7

#11 @afercia
7 years ago

  • Keywords title-attribute added
Note: See TracTickets for help on using tickets.