Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#26557 closed defect (bug) (fixed)

Remove title attributes: category-template.php

Reported by: joedolson's profile joedolson Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.0 Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: has-patch, title-attribute
Focuses: accessibility, template Cc:

Description (last modified by SergeyBiryukov)

Related: #24766

// category-template.php
get_category_parents()
get_the_category_list()
wp_generate_tag_cloud()
start_el()

Attachments (1)

26557.patch (4.3 KB) - added by joedolson 11 years ago.
Remove title attributes for category-template.php

Download all attachments as: .zip

Change History (10)

#1 @SergeyBiryukov
11 years ago

  • Description modified (diff)

#2 @joedolson
11 years ago

Most of these title attributes are nothing more than elaborations of the implied intent of the normal link text, e.g. "View all posts in 'category'". There are a couple of exceptions - one, in start_el(), using the category description as a title attribute, and the other in the wp_generate_tag_cloud(), which adds detail information including the number of posts in that tag to the title attribute.

While the title attribute may not be the optimal way of presenting the information, themes would be able to expose it via JS if needed, and it is adding value to the link text, so I've left them in this patch.

@joedolson
11 years ago

Remove title attributes for category-template.php

#3 @joedolson
11 years ago

  • Keywords has-patch added

#4 @nacin
11 years ago

  • Component changed from Accessibility to Template
  • Focuses accessibility added

#5 @nacin
11 years ago

  • Component changed from Template to Taxonomy
  • Focuses template added

#6 @wonderboymusic
11 years ago

  • Milestone changed from Awaiting Review to 4.0

We've been in the habit lately of heeding this advice

#7 @wonderboymusic
11 years ago

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

In 28359:

Remove the title attribute from markup generated in wp-includes/category-template.php:

  • get_category_parents()
  • get_the_category_list()
  • wp_generate_tag_cloud()
  • Walker_Category::start_el()

Props joedolson.
Fixes #26557.

#8 @SergeyBiryukov
11 years ago

In 28572:

Fix inversed logic in Walker_Category::start_el(). see [28359].
Correct 'use_desc_for_title' parameter description.

see #26557.

#9 @afercia
8 years ago

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