Lists View Switcher: Replace blank image with screen reader text.

props davidakennedy.
fixes #28871.
Built from https://develop.svn.wordpress.org/trunk@29133


git-svn-id: http://core.svn.wordpress.org/trunk@28918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2014-07-13 11:05:15 +00:00
parent e8369f9d25
commit 6ef23ea006
7 changed files with 6 additions and 19 deletions

View File

@ -618,10 +618,6 @@ classes exist in paginate_links() but not seen in list table output. */
margin: 5px 8px 0 16px;
}
.view-switch img {
display: none;
}
.view-switch a {
text-decoration: none;
}

View File

@ -618,10 +618,6 @@ classes exist in paginate_links() but not seen in list table output. */
margin: 5px 16px 0 8px;
}
.view-switch img {
display: none;
}
.view-switch a {
text-decoration: none;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -500,11 +500,9 @@ class WP_List_Table {
if ( $current_mode == $mode )
$classes[] = 'current';
printf(
"<a href='%s' class='%s'><img id='view-switch-$mode' src='%s' width='20' height='20' title='%s' alt='%s' /></a>\n",
"<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
esc_url( add_query_arg( 'mode', $mode ) ),
implode( ' ', $classes ),
esc_url( includes_url( 'images/blank.gif' ) ),
$title,
$title
);
}

View File

@ -156,13 +156,10 @@ class WP_Media_List_Table extends WP_List_Table {
if ( $current_mode == $mode )
$classes[] = 'current';
printf(
"<a href='%s' class='%s'><img id='view-switch-$mode' src='%s' width='20' height='20' title='%s' alt='%s' /></a>\n",
"<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
esc_url( add_query_arg( 'mode', $mode ) ),
implode( ' ', $classes ),
esc_url( includes_url( 'images/blank.gif' ) ),
$title,
$title
);
}
?>

View File

@ -225,10 +225,10 @@ function wp_print_media_templates() {
<script type="text/html" id="tmpl-media-library-view-switcher">
<a href="<?php echo esc_url( add_query_arg( 'mode', 'list', $_SERVER['REQUEST_URI'] ) ) ?>" class="view-list">
<img id="view-switch-list" src="<?php echo includes_url( 'images/blank.gif' ) ?>" width="20" height="20" title="List View" alt="List View"/>
<span class="screen-reader-text"><?php _e( 'List View' ); ?></span>
</a>
<a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', $_SERVER['REQUEST_URI'] ) ) ?>" class="view-grid current">
<img id="view-switch-excerpt" src="<?php echo includes_url( 'images/blank.gif' ) ?>" width="20" height="20" title="Grid View" alt="Grid View"/>
<span class="screen-reader-text"><?php _e( 'Grid View' ); ?></span>
</a>
</script>