WordPress.org

Make WordPress Core

Changeset 29201


Ignore:
Timestamp:
07/16/14 22:49:53 (3 years ago)
Author:
wonderboymusic
Message:

In Plugin Install List Table, remove title attribute for plugin action links; add screen-reader-text.

Props joedolson.
Fixes #28853.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r29171 r29201  
    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 
     
    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 
     
    280280                                '&amp;TB_iframe=true&amp;width=600&amp;height=550' ); 
    281281 
    282             $action_links[] = '<a href="' . esc_attr( $details_link ) . '" class="thickbox" title="' . 
    283                                 esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '">' . __( 'More Details' ) . '</a>'; 
     282            $action_links[] = '<a href="' . esc_attr( $details_link ) . '" class="thickbox" aria-labelledby="' . $plugin['slug'] . '" data-title="' . esc_attr( $name ) . '">' . __( 'More Details' ) . '</a>'; 
     283 
    284284 
    285285            /** 
  • trunk/src/wp-admin/js/plugin-install.js

    r29125 r29201  
    3939    }); 
    4040 
    41     $('.plugins').on( 'click', 'a.thickbox', function() { 
     41    $('.plugin-card').on( 'click', 'a.thickbox', function() { 
    4242        tb_click.call(this); 
    4343 
    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).data( 'title' ) ); 
    4646        return false; 
    4747    }); 
Note: See TracChangeset for help on using the changeset viewer.