Make WordPress Core

Changeset 43019

Timestamp:
04/29/2018 04:24:41 PM (6 years 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.

Location:
trunk/src/wp-admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/colors/_admin.scss

    r40576 r43019  
    8585
    8686.wrap .add-new-h2:hover, /* deprecated */
    87 .wrap .page-title-action:hover,
    88 .tablenav .tablenav-pages a:hover,
    89 .tablenav .tablenav-pages a:focus {
     87.wrap .page-title-action:hover {
    9088    color: $menu-text;
    9189    background-color: $menu-background;
  • trunk/src/wp-admin/css/list-tables.css

    r42810 r43019  
    611611}
    612612
    613 /* Bulk Actions */
    614 .tablenav-pages a,
    615 .tablenav-pages-navspan {
    616     font-weight: 600;
    617     padding: 0 2px;
    618 }
    619 
    620613.tablenav-pages .current-page {
    621614    margin: 0 2px 0 0;
     615
    622616    padding-bottom: 5px;
    623617    font-size: 13px;
     
    631625.tablenav #table-paging {
    632626    margin-left: 2px;
    633 }
    634 
    635 .tablenav a.button,
    636 .tablenav a.button-secondary {
    637     display: block;
    638     margin: 3px 8px 0 0;
    639627}
    640628
     
    652640.tablenav .tablenav-pages {
    653641    float: right;
    654     height: 28px;
    655     margin-top: 3px;
    656     cursor: default;
    657     color: #555;
     642    margin: 3px 0 9px;
    658643}
    659644
     
    663648}
    664649
    665 .tablenav .tablenav-pages a,
    666 .tablenav-pages span.current  {
    667     text-decoration: none;
    668     padding: 3px 6px;
    669 }
    670 
    671 .tablenav .tablenav-pages a,
    672 .tablenav-pages-navspan {
     650.tablenav .tablenav-pages .button,
     651.tablenav .tablenav-pages .tablenav-pages-navspan {
    673652    display: inline-block;
    674     min-width: 17px;
    675     border: 1px solid #ccc; /* same color as buttons border */
    676     padding: 3px 5px 7px;
    677     background: #e5e5e5;
     653    vertical-align: baseline;
     654    min-width: 28px;
     655    min-height: 28px;
     656    margin: 0;
     657    padding: 0 4px;
    678658    font-size: 16px;
    679     line-height: 1;
    680     font-weight: 400;
     659    line-height: 1.5;
    681660    text-align: center;
    682 }
    683 
    684 .tablenav-pages-navspan {
    685     height: 16px;
    686     border-color: #ddd; /* same as disabled buttons */
    687     background: #f7f7f7; /* same as disabled buttons */
    688     color: #a0a5aa; /* same as disabled buttons */
    689 }
    690 
    691 .tablenav .tablenav-pages a:hover,
    692 .tablenav .tablenav-pages a:focus {
    693     border-color: #5b9dd9;
    694     color: #fff;
    695     background: #00a0d2;
    696     box-shadow: none;
    697     outline: none; /* IE8 */
    698661}
    699662
     
    704667.tablenav .one-page .displaying-num {
    705668    display: inline-block;
    706     margin-top: 5px;
    707     margin-right: 0;
     669    margin: 5px 0;
    708670}
    709671
     
    722684}
    723685
    724 /* @todo: unclear if the following tablenav rules are actually used.
    725 classes exist in paginate_links() but not seen in list table output. */
    726 .tablenav .dots {
    727     border-color: transparent;
    728 }
    729 
    730 .tablenav .next,
    731 .tablenav .prev {
    732     border-color: transparent;
    733     color: #0073aa;
    734 }
    735 
    736 .tablenav .next:hover,
    737 .tablenav .prev:hover {
    738     border-color: transparent;
    739     color: #00a0d2;
    740 }
    741 
     686/* This view-switcher is still used on multisite. */
    742687.tablenav .view-switch {
    743688    float: right;
     
    17181663    .tablenav .tablenav-pages {
    17191664        width: 100%;
    1720         height: auto;
    17211665        text-align: center;
    17221666        margin: 0 0 25px;
     
    17401684    }
    17411685
    1742     .tablenav-pages .pagination-links a,
    1743     .tablenav-pages-navspan {
    1744         padding: 9px 11px 12px;
     1686    .tablenav .tablenav-pages .button,
     1687    .tablenav .tablenav-pages .tablenav-pages-navspan {
     1688        min-width: 44px;
     1689        padding: 12px 8px;
    17451690        font-size: 18px;
    1746     }
    1747 
    1748     .tablenav-pages-navspan {
    1749         height: 18px;
     1691        line-height: 1;
    17501692    }
    17511693
    17521694    .tablenav-pages .pagination-links .current-page {
    1753         padding: 8px 9px 9px;
     1695        min-width: 44px;
     1696        padding: 12px 6px;
    17541697        font-size: 16px;
     1698
    17551699    }
    17561700
  • 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" 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' 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" 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' 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" 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' 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" 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' 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' ),
  • trunk/src/wp-admin/network/sites.php

    r42349 r43019  
    358358<?php echo $msg; ?>
    359359
    360 <form method="get" id="ms-search">
     360<form method="get" id="ms-search">
    361361<?php $wp_list_table->search_box( __( 'Search Sites' ), 'site' ); ?>
    362362<input type="hidden" name="action" value="blogs" />
Note: See TracChangeset for help on using the changeset viewer.