Make WordPress Core

Changeset 29133


Ignore:
Timestamp:
07/13/2014 11:04:21 AM (12 years ago)
Author:
ocean90
Message:

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

props davidakennedy.
fixes #28871.

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/list-tables.css

    r29047 r29133  
    619619}
    620620
    621 .view-switch img {
    622         display: none;
    623 }
    624 
    625621.view-switch a {
    626622        text-decoration: none;
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r29118 r29133  
    501501                                        $classes[] = 'current';
    502502                                printf(
    503                                         "<a href='%s' class='%s'><img id='view-switch-$mode' src='%s' width='20' height='20' title='%s' alt='%s' /></a>\n",
     503                                        "<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
    504504                                        esc_url( add_query_arg( 'mode', $mode ) ),
    505505                                        implode( ' ', $classes ),
    506                                         esc_url( includes_url( 'images/blank.gif' ) ),
    507                                         $title,
    508506                                        $title
    509507                                );
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r29118 r29133  
    157157                                        $classes[] = 'current';
    158158                                printf(
    159                                         "<a href='%s' class='%s'><img id='view-switch-$mode' src='%s' width='20' height='20' title='%s' alt='%s' /></a>\n",
     159                                        "<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
    160160                                        esc_url( add_query_arg( 'mode', $mode ) ),
    161161                                        implode( ' ', $classes ),
    162                                         esc_url( includes_url( 'images/blank.gif' ) ),
    163                                         $title,
    164162                                        $title
    165 
    166163                                );
    167164                        }
  • trunk/src/wp-includes/media-template.php

    r29106 r29133  
    226226        <script type="text/html" id="tmpl-media-library-view-switcher">
    227227                <a href="<?php echo esc_url( add_query_arg( 'mode', 'list', $_SERVER['REQUEST_URI'] ) ) ?>" class="view-list">
    228                         <img id="view-switch-list" src="<?php echo includes_url( 'images/blank.gif' ) ?>" width="20" height="20" title="List View" alt="List View"/>
     228                        <span class="screen-reader-text"><?php _e( 'List View' ); ?></span>
    229229                </a>
    230230                <a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', $_SERVER['REQUEST_URI'] ) ) ?>" class="view-grid current">
    231                         <img id="view-switch-excerpt" src="<?php echo includes_url( 'images/blank.gif' ) ?>" width="20" height="20" title="Grid View" alt="Grid View"/>
     231                        <span class="screen-reader-text"><?php _e( 'Grid View' ); ?></span>
    232232                </a>
    233233        </script>
Note: See TracChangeset for help on using the changeset viewer.