mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 14:47:02 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@43019 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -817,10 +817,10 @@ foreach ( $this->modes as $mode => $title ) {
|
||||
}
|
||||
|
||||
if ( $disable_first ) {
|
||||
$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">«</span>';
|
||||
$page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">«</span>';
|
||||
} else {
|
||||
$page_links[] = sprintf(
|
||||
"<a class='first-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
||||
"<a class='first-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
||||
esc_url( remove_query_arg( 'paged', $current_url ) ),
|
||||
__( 'First page' ),
|
||||
'«'
|
||||
@@ -828,10 +828,10 @@ foreach ( $this->modes as $mode => $title ) {
|
||||
}
|
||||
|
||||
if ( $disable_prev ) {
|
||||
$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">‹</span>';
|
||||
$page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">‹</span>';
|
||||
} else {
|
||||
$page_links[] = sprintf(
|
||||
"<a class='prev-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
||||
"<a class='prev-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
||||
esc_url( add_query_arg( 'paged', max( 1, $current - 1 ), $current_url ) ),
|
||||
__( 'Previous page' ),
|
||||
'‹'
|
||||
@@ -853,10 +853,10 @@ foreach ( $this->modes as $mode => $title ) {
|
||||
$page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . $total_pages_after;
|
||||
|
||||
if ( $disable_next ) {
|
||||
$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">›</span>';
|
||||
$page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">›</span>';
|
||||
} else {
|
||||
$page_links[] = sprintf(
|
||||
"<a class='next-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
||||
"<a class='next-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
||||
esc_url( add_query_arg( 'paged', min( $total_pages, $current + 1 ), $current_url ) ),
|
||||
__( 'Next page' ),
|
||||
'›'
|
||||
@@ -864,10 +864,10 @@ foreach ( $this->modes as $mode => $title ) {
|
||||
}
|
||||
|
||||
if ( $disable_last ) {
|
||||
$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">»</span>';
|
||||
$page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">»</span>';
|
||||
} else {
|
||||
$page_links[] = sprintf(
|
||||
"<a class='last-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
||||
"<a class='last-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
||||
esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
|
||||
__( 'Last page' ),
|
||||
'»'
|
||||
|
||||
Reference in New Issue
Block a user