Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#26557 closed defect (bug) (fixed)

Remove title attributes: category-template.php

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

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 13 years ago.
Remove title attributes for category-template.php

Download all attachments as: .zip

Change History (10)

#1 @SergeyBiryukov
13 years ago

  • Description modified (diff)

#2 @joedolson
13 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
13 years ago

Remove title attributes for category-template.php

#3 @joedolson
13 years ago

  • Keywords has-patch added

#4 @nacin
13 years ago

  • Component Accessibility → Template
  • Focuses accessibility added

#5 @nacin
13 years ago

  • Component Template → Taxonomy
  • Focuses template added

#6 @wonderboymusic
13 years ago

  • Milestone Awaiting Review → 4.0

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

#7 @wonderboymusic
13 years ago

  • Owner set to wonderboymusic
  • Resolution → fixed
  • Status new → 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
12 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
10 years ago

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