WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/29/2018 04:24:41 PM (16 months ago)
Author:
afercia
Message:

Accessibility: Better color contrast for the tables pagination links.

By making the pagination links use the default style for buttons, color contrast
is improved and the CSS is simplified. Improves consistency with other UI controls.
Also, slightly increases the white space below the pagination links.

Props benoitchantre, afercia.
Fixes #41858.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r42871 r43019  
    818818
    819819        if ( $disable_first ) {
    820             $page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&laquo;</span>';
     820            $page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">&laquo;</span>';
    821821        } else {
    822822            $page_links[] = sprintf(
    823                 "<a class='first-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
     823                "<a class='first-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
    824824                esc_url( remove_query_arg( 'paged', $current_url ) ),
    825825                __( 'First page' ),
     
    829829
    830830        if ( $disable_prev ) {
    831             $page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&lsaquo;</span>';
     831            $page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">&lsaquo;</span>';
    832832        } else {
    833833            $page_links[] = sprintf(
    834                 "<a class='prev-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
     834                "<a class='prev-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
    835835                esc_url( add_query_arg( 'paged', max( 1, $current - 1 ), $current_url ) ),
    836836                __( 'Previous page' ),
     
    854854
    855855        if ( $disable_next ) {
    856             $page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&rsaquo;</span>';
     856            $page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">&rsaquo;</span>';
    857857        } else {
    858858            $page_links[] = sprintf(
    859                 "<a class='next-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
     859                "<a class='next-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
    860860                esc_url( add_query_arg( 'paged', min( $total_pages, $current + 1 ), $current_url ) ),
    861861                __( 'Next page' ),
     
    865865
    866866        if ( $disable_last ) {
    867             $page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&raquo;</span>';
     867            $page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">&raquo;</span>';
    868868        } else {
    869869            $page_links[] = sprintf(
    870                 "<a class='last-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
     870                "<a class='last-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
    871871                esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
    872872                __( 'Last page' ),
Note: See TracChangeset for help on using the changeset viewer.