Make WordPress Core

Ticket #28853: 28853.2.patch

File 28853.2.patch, 3.4 KB (added by joedolson, 11 years ago)

Instead of screen reader hidden, aria-labelled by

  • wp-admin/includes/class-wp-plugin-install-list-table.php

     
    259259                                switch ( $status['status'] ) {
    260260                                        case 'install':
    261261                                                if ( $status['url'] ) {
    262                                                         $action_links[] = '<a class="install-now button" href="' . $status['url'] . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>';
     262                                                        $action_links[] = '<a class="install-now button" href="' . $status['url'] . '" aria-labelledby="' . $plugin['slug'] . '">' . __( 'Install Now' ) . '</a>';
    263263                                                }
    264264
    265265                                                break;
    266266                                        case 'update_available':
    267267                                                if ( $status['url'] ) {
    268                                                         $action_links[] = '<a class="button" href="' . $status['url'] . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $status['version'] ) ) . '">' . __( 'Update Now' ) . '</a>';
     268                                                        $action_links[] = '<a class="button" href="' . $status['url'] . '" aria-labelledby="' . $plugin['slug'] . '">' . __( 'Update Now' ) . '</a>';
    269269                                                }
    270270
    271271                                                break;
     
    289289                         */
    290290                        $details_link = apply_filters( 'plugin_install_details_link', $details_link, $plugin );
    291291
    292                         $action_links[] = '<a href="' . esc_attr( $details_link ) . '" class="thickbox" title="' .
    293                                                                 esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '">' . __( 'More Details' ) . '</a>';
     292                        $action_links[] = '<a href="' . esc_attr( $details_link ) . '" class="thickbox" aria-labelledby="' . $plugin['slug'] . '" data-title="' . esc_attr( $name ) . '">' . __( 'More Details' ) . '</a>';
    294293
     294
    295295                        /**
    296296                         * Filter the install action links for a plugin.
    297297                         *
     
    304304                ?>
    305305                <div class="plugin-card">
    306306                        <div class="plugin-card-top">
    307                                 <div class="name column-name"<?php echo $style['name']; ?>><h4><a href="<?php echo esc_attr( $details_link ) ?>" class="thickbox"><?php echo $title; ?></a></h4>
     307                                <div class="name column-name"<?php echo $style['name']; ?>><h4 id="<?php echo $plugin['slug']; ?>"><a href="<?php echo esc_attr( $details_link ) ?>" class="thickbox" data-title="<?php esc_attr_e( $name ); ?>"><?php echo $title; ?></a></h4>
    308308                                        <div class="action-links">
    309309                                                <?php
    310310                                                        if ( ! empty( $action_links ) ) {
  • wp-admin/js/plugin-install.js

     
    88                        width = $( window ).width(),
    99                        H = $( window ).height() - ( ( 850 < width ) ? 60 : 20 ),
    1010                        W = ( 850 < width ) ? 830 : width - 20;
    11 
     11               
    1212                if ( tbWindow.size() ) {
    1313                        tbWindow.width( W ).height( H );
    1414                        $( '#TB_iframeContent' ).width( W ).height( H );
     
    3838                tb_position();
    3939        });
    4040
    41         $('.plugins').on( 'click', 'a.thickbox', function() {
     41        $('.plugin-card').on( 'click', 'a.thickbox', function() {
    4242                tb_click.call(this);
    43 
     43               
    4444                $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
    45                 $('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong>&nbsp;' + $(this).attr('title') );
     45                $('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong>&nbsp;' + $(this).attr( 'data-title' ) );
    4646                return false;
    4747        });
    4848