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:
parent
e8369f9d25
commit
6ef23ea006
|
@ -618,10 +618,6 @@ classes exist in paginate_links() but not seen in list table output. */
|
||||||
margin: 5px 8px 0 16px;
|
margin: 5px 8px 0 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.view-switch img {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.view-switch a {
|
.view-switch a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -618,10 +618,6 @@ classes exist in paginate_links() but not seen in list table output. */
|
||||||
margin: 5px 16px 0 8px;
|
margin: 5px 16px 0 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.view-switch img {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.view-switch a {
|
.view-switch a {
|
||||||
text-decoration: none;
|
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
|
@ -500,11 +500,9 @@ class WP_List_Table {
|
||||||
if ( $current_mode == $mode )
|
if ( $current_mode == $mode )
|
||||||
$classes[] = 'current';
|
$classes[] = 'current';
|
||||||
printf(
|
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 ) ),
|
esc_url( add_query_arg( 'mode', $mode ) ),
|
||||||
implode( ' ', $classes ),
|
implode( ' ', $classes ),
|
||||||
esc_url( includes_url( 'images/blank.gif' ) ),
|
|
||||||
$title,
|
|
||||||
$title
|
$title
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,13 +156,10 @@ class WP_Media_List_Table extends WP_List_Table {
|
||||||
if ( $current_mode == $mode )
|
if ( $current_mode == $mode )
|
||||||
$classes[] = 'current';
|
$classes[] = 'current';
|
||||||
printf(
|
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 ) ),
|
esc_url( add_query_arg( 'mode', $mode ) ),
|
||||||
implode( ' ', $classes ),
|
implode( ' ', $classes ),
|
||||||
esc_url( includes_url( 'images/blank.gif' ) ),
|
|
||||||
$title,
|
|
||||||
$title
|
$title
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -225,10 +225,10 @@ function wp_print_media_templates() {
|
||||||
|
|
||||||
<script type="text/html" id="tmpl-media-library-view-switcher">
|
<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">
|
<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>
|
||||||
<a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', $_SERVER['REQUEST_URI'] ) ) ?>" class="view-grid current">
|
<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>
|
</a>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue