[wp-trac] [WordPress Trac] #16527: Accessibility Improvement to category-template.php

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 10 20:55:31 UTC 2011

#16527: Accessibility Improvement to category-template.php
 Reporter:  wpsmith       |      Owner:  wpsmith
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.1
 Severity:  normal        |   Keywords:
 When I was testing my site ([http://travisthoughts.com], running WordPress
 3.1 RC4) for accessibility at [http://wave.webaim.org/], I noticed that
 the categories widget was not displaying a <label> tag. So upon
 investigation, I discovered that category-template.php wasn't issuing a
 <label> tag on line 334 in the function wp_dropdown_categories(). So I
 propose the following edit.
 $output = "<label for='$id' style='display:none;'>$name</label><select
 name='$name' id='$id' class='$class' $tab_index_attribute>\n"; //added
 <label for='$id' style='display:none;'>$name</label>

 Once I made this change, my site passed web accessibility.

Ticket URL: <http://core.trac.wordpress.org/ticket/16527>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list