_s: Use .screen-reader-text rather than .assistive-text.

With 3.6 introducing many HTML5 improvements the need for custom
searchform and comment templates will vanish. To cope with core's
.screen-reader-text class, let's make the switch early.

Commit also adds core's focus styles for screen reader texts, so they
can actually be used.
This commit is contained in:
obenland 2013-03-13 15:39:05 -07:00
parent bdecbd3734
commit 1ba2f62752
5 changed files with 27 additions and 7 deletions

View file

@ -36,7 +36,7 @@
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-above" class="navigation-comment" role="navigation">
<h1 class="assistive-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
<div class="previous"><?php previous_comments_link( __( '&larr; Older Comments', '_s' ) ); ?></div>
<div class="next"><?php next_comments_link( __( 'Newer Comments &rarr;', '_s' ) ); ?></div>
</nav><!-- #comment-nav-before -->
@ -56,7 +56,7 @@
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-below" class="navigation-comment" role="navigation">
<h1 class="assistive-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
<div class="previous"><?php previous_comments_link( __( '&larr; Older Comments', '_s' ) ); ?></div>
<div class="next"><?php next_comments_link( __( 'Newer Comments &rarr;', '_s' ) ); ?></div>
</nav><!-- #comment-nav-below -->