Make WordPress Core

Ticket #32028: 32028.2.diff

File 32028.2.diff, 4.1 KB (added by obenland, 10 years ago)

Preserves class="paging-input", with Safari fix.

  • src/wp-admin/css/list-tables.css

     
    527527        cursor: default;
    528528        height: 30px;
    529529        color: #555;
    530         line-height: 30px;
     530        line-height: 2.5;
    531531        font-size: 12px;
    532532}
    533533
     
    546546        padding: 0 10px 3px;
    547547        background: #eee;
    548548        background: rgba( 0, 0, 0, 0.05 );
     549        display: inline-block;
    549550        font-size: 16px;
    550551        font-weight: normal;
     552        line-height: 1.3333;
    551553}
    552554
    553555.tablenav .tablenav-pages a:hover,
     
    15971599
    15981600        .tablenav-pages .pagination-links a {
    15991601                padding: 8px 20px 11px;
     1602                display: inline;
    16001603                font-size: 18px;
    16011604                background: rgba(0, 0, 0, 0.05);
    16021605        }
  • src/wp-admin/includes/class-wp-list-table.php

     
    701701
    702702                $page_links = array();
    703703
     704                $total_pages_before = '<span class="paging-input">';
     705                $total_pages_after  = '</span>';
     706
    704707                $disable_first = $disable_last = '';
    705708                if ( $current == 1 ) {
    706709                        $disable_first = ' disabled';
     
    708711                if ( $current == $total_pages ) {
    709712                        $disable_last = ' disabled';
    710713                }
    711                 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
     714                $page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
    712715                        'first-page' . $disable_first,
    713                         esc_attr__( 'Go to the first page' ),
    714716                        esc_url( remove_query_arg( 'paged', $current_url ) ),
     717                        __( 'First page' ),
    715718                        '&laquo;'
    716719                );
    717720
    718                 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
     721                $page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
    719722                        'prev-page' . $disable_first,
    720                         esc_attr__( 'Go to the previous page' ),
    721723                        esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
     724                        __( 'Previous page' ),
    722725                        '&lsaquo;'
    723726                );
    724727
    725728                if ( 'bottom' == $which ) {
    726                         $html_current_page = $current;
     729                        $html_current_page  = $current;
     730                        $total_pages_before = '<span id="table-paging" class="paging-input">';
    727731                } else {
    728                         $html_current_page = sprintf( "%s<input class='current-page' id='current-page-selector' title='%s' type='text' name='paged' value='%s' size='%d' />",
    729                                 '<label for="current-page-selector" class="screen-reader-text">' . __( 'Select Page' ) . '</label>',
    730                                 esc_attr__( 'Current page' ),
     732                        $html_current_page = sprintf( "%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' />",
     733                                '<label for="current-page-selector" class="screen-reader-text">' . __( 'Current Page' ) . '</label>',
    731734                                $current,
    732735                                strlen( $total_pages )
    733736                        );
    734737                }
    735738                $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
    736                 $page_links[] = '<span class="paging-input">' . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . '</span>';
     739                $page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . $total_pages_after;
    737740
    738                 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
     741                $page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
    739742                        'next-page' . $disable_last,
    740                         esc_attr__( 'Go to the next page' ),
    741743                        esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
     744                        __( 'Next page' ),
    742745                        '&rsaquo;'
    743746                );
    744747
    745                 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
     748                $page_links[] = sprintf( "<a class='%s' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
    746749                        'last-page' . $disable_last,
    747                         esc_attr__( 'Go to the last page' ),
    748750                        esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
     751                        __( 'Last page' ),
    749752                        '&raquo;'
    750753                );
    751754