WordPress.org

Make WordPress Core

Ticket #11554: 11554.patch

File 11554.patch, 2.0 KB (added by iammattthomas, 5 years ago)

Removes the summary attribute from the calendar table element. Removes the abbr attribute from the calendar th and td elements. Calendar output validates as HTML5.

  • wp-includes/general-template.php

     
    10731073 
    10741074        /* translators: Calendar caption: 1: month name, 2: 4-digit year */ 
    10751075        $calendar_caption = _x('%1$s %2$s', 'calendar caption'); 
    1076         echo '<table id="wp-calendar" summary="' . esc_attr__('Calendar') . '"> 
     1076        echo '<table id="wp-calendar"> 
    10771077        <caption>' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</caption> 
    10781078        <thead> 
    10791079        <tr>'; 
     
    10871087        foreach ( $myweek as $wd ) { 
    10881088                $day_name = (true == $initial) ? $wp_locale->get_weekday_initial($wd) : $wp_locale->get_weekday_abbrev($wd); 
    10891089                $wd = esc_attr($wd); 
    1090                 echo "\n\t\t<th abbr=\"$wd\" scope=\"col\" title=\"$wd\">$day_name</th>"; 
     1090                echo "\n\t\t<th scope=\"col\" title=\"$wd\">$day_name</th>"; 
    10911091        } 
    10921092 
    10931093        echo ' 
     
    10981098        <tr>'; 
    10991099 
    11001100        if ( $previous ) { 
    1101                 echo "\n\t\t".'<td abbr="' . $wp_locale->get_month($previous->month) . '" colspan="3" id="prev"><a href="' . 
     1101                echo "\n\t\t".'<td colspan="3" id="prev"><a href="' . 
    11021102                get_month_link($previous->year, $previous->month) . '" title="' . sprintf(__('View posts for %1$s %2$s'), $wp_locale->get_month($previous->month), 
    11031103                        date('Y', mktime(0, 0 , 0, $previous->month, 1, $previous->year))) . '">&laquo; ' . $wp_locale->get_month_abbrev($wp_locale->get_month($previous->month)) . '</a></td>'; 
    11041104        } else { 
     
    11081108        echo "\n\t\t".'<td class="pad">&nbsp;</td>'; 
    11091109 
    11101110        if ( $next ) { 
    1111                 echo "\n\t\t".'<td abbr="' . $wp_locale->get_month($next->month) . '" colspan="3" id="next"><a href="' . 
     1111                echo "\n\t\t".'<td colspan="3" id="next"><a href="' . 
    11121112                get_month_link($next->year, $next->month) . '" title="' . esc_attr( sprintf(__('View posts for %1$s %2$s'), $wp_locale->get_month($next->month) , 
    11131113                        date('Y', mktime(0, 0 , 0, $next->month, 1, $next->year))) ) . '">' . $wp_locale->get_month_abbrev($wp_locale->get_month($next->month)) . ' &raquo;</a></td>'; 
    11141114        } else {