From 40c73b7d0d250b9f55f6de9a70fd4cee060249f6 Mon Sep 17 00:00:00 2001 From: Ian Stewart Date: Wed, 12 Nov 2014 23:26:25 +0000 Subject: [PATCH] Twenty Fifteen: adding context to pagination links for screenreaders. Props afercia, iamtakashi, fixes #30152 Built from https://develop.svn.wordpress.org/trunk@30316 git-svn-id: http://core.svn.wordpress.org/trunk@30315 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyfifteen/archive.php | 4 +++- wp-content/themes/twentyfifteen/index.php | 4 +++- wp-content/themes/twentyfifteen/rtl.css | 5 ----- wp-content/themes/twentyfifteen/search.php | 4 +++- wp-content/themes/twentyfifteen/single.php | 4 ++-- wp-content/themes/twentyfifteen/style.css | 17 +++++++++++------ wp-includes/version.php | 2 +- 7 files changed, 23 insertions(+), 17 deletions(-) diff --git a/wp-content/themes/twentyfifteen/archive.php b/wp-content/themes/twentyfifteen/archive.php index 801b86f0fb..1a9f70609c 100644 --- a/wp-content/themes/twentyfifteen/archive.php +++ b/wp-content/themes/twentyfifteen/archive.php @@ -46,7 +46,9 @@ get_header(); ?> '' . __( 'Page', 'twentyfifteen' ) . '', + 'prev_text' => __( 'Previous page', 'twentyfifteen' ), + 'next_text' => __( 'Next page', 'twentyfifteen' ), + 'before_page_number' => '' . __( 'Page', 'twentyfifteen' ) . ' ', ) ); ?> diff --git a/wp-content/themes/twentyfifteen/index.php b/wp-content/themes/twentyfifteen/index.php index df6dcaa3f7..937021490b 100644 --- a/wp-content/themes/twentyfifteen/index.php +++ b/wp-content/themes/twentyfifteen/index.php @@ -42,7 +42,9 @@ get_header(); ?> '' . __( 'Page', 'twentyfifteen' ) . '', + 'prev_text' => __( 'Previous page', 'twentyfifteen' ), + 'next_text' => __( 'Next page', 'twentyfifteen' ), + 'before_page_number' => '' . __( 'Page', 'twentyfifteen' ) . ' ', ) ); ?> diff --git a/wp-content/themes/twentyfifteen/rtl.css b/wp-content/themes/twentyfifteen/rtl.css index 19d4120692..2e4c3ba385 100644 --- a/wp-content/themes/twentyfifteen/rtl.css +++ b/wp-content/themes/twentyfifteen/rtl.css @@ -151,11 +151,6 @@ td { left: auto; } -.pagination .meta-nav { - margin-right: auto; - margin-left: 0.3333em; -} - .pagination .prev { right: 0; left: auto; diff --git a/wp-content/themes/twentyfifteen/search.php b/wp-content/themes/twentyfifteen/search.php index 0700594208..b0f5dd8b95 100644 --- a/wp-content/themes/twentyfifteen/search.php +++ b/wp-content/themes/twentyfifteen/search.php @@ -34,7 +34,9 @@ get_header(); ?> '' . __( 'Page', 'twentyfifteen' ) . '', + 'prev_text' => __( 'Previous page', 'twentyfifteen' ), + 'next_text' => __( 'Next page', 'twentyfifteen' ), + 'before_page_number' => '' . __( 'Page', 'twentyfifteen' ) . ' ', ) ); ?> diff --git a/wp-content/themes/twentyfifteen/single.php b/wp-content/themes/twentyfifteen/single.php index a0bfc8060c..f57d62b468 100644 --- a/wp-content/themes/twentyfifteen/single.php +++ b/wp-content/themes/twentyfifteen/single.php @@ -25,8 +25,8 @@ get_header(); ?> _x( 'Next%title', 'Next post link', 'twentyfifteen' ), - 'prev_text' => _x( 'Previous%title', 'Previous post link', 'twentyfifteen' ), + 'next_text' => _x( 'Next post:%title', 'Next post link', 'twentyfifteen' ), + 'prev_text' => _x( 'Previous post:%title', 'Previous post link', 'twentyfifteen' ) ) ); ?> diff --git a/wp-content/themes/twentyfifteen/style.css b/wp-content/themes/twentyfifteen/style.css index 36eeed33bc..4feff30c81 100644 --- a/wp-content/themes/twentyfifteen/style.css +++ b/wp-content/themes/twentyfifteen/style.css @@ -1025,14 +1025,18 @@ a:focus { text-align: center; } -.pagination .meta-nav { - margin-right: 0.3333em; +/* reset screen-reader-text */ +.pagination .current .screen-reader-text { + position: static !important; } .pagination .page-numbers { display: none; line-height: 3.2em; padding: 0 0.6667em; +} + +.pagination .page-numbers.current { text-transform: uppercase; } @@ -2754,12 +2758,13 @@ span > video { padding: 0; } - .pagination .page-numbers { - display: inline-block; + /* restore screen-reader-text */ + .pagination .current .screen-reader-text { + position: absolute !important; } - .pagination .meta-nav { - display: none; + .pagination .page-numbers { + display: inline-block; } .image-navigation { diff --git a/wp-includes/version.php b/wp-includes/version.php index 416cbe64c5..775d2d963c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30315'; +$wp_version = '4.1-alpha-30316'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.