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

Props joedolson.
Fixes #28853.


git-svn-id: https://develop.svn.wordpress.org/trunk@29201 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-07-16 22:49:53 +00:00
parent bda6f0cffe
commit 283fa473e6
2 changed files with 6 additions and 6 deletions

View File

@ -259,13 +259,13 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
switch ( $status['status'] ) {
case 'install':
if ( $status['url'] ) {
$action_links[] = '<a class="install-now button" href="' . $status['url'] . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>';
$action_links[] = '<a class="install-now button" href="' . $status['url'] . '" aria-labelledby="' . $plugin['slug'] . '">' . __( 'Install Now' ) . '</a>';
}
break;
case 'update_available':
if ( $status['url'] ) {
$action_links[] = '<a class="button" href="' . $status['url'] . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $status['version'] ) ) . '">' . __( 'Update Now' ) . '</a>';
$action_links[] = '<a class="button" href="' . $status['url'] . '" aria-labelledby="' . $plugin['slug'] . '">' . __( 'Update Now' ) . '</a>';
}
break;
@ -279,8 +279,8 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
$details_link = self_admin_url( 'plugin-install.php?tab=plugin-information&amp;plugin=' . $plugin['slug'] .
'&amp;TB_iframe=true&amp;width=600&amp;height=550' );
$action_links[] = '<a href="' . esc_attr( $details_link ) . '" class="thickbox" title="' .
esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '">' . __( 'More Details' ) . '</a>';
$action_links[] = '<a href="' . esc_attr( $details_link ) . '" class="thickbox" aria-labelledby="' . $plugin['slug'] . '" data-title="' . esc_attr( $name ) . '">' . __( 'More Details' ) . '</a>';
/**
* Filter the install action links for a plugin.

View File

@ -38,11 +38,11 @@ jQuery( document ).ready( function( $ ) {
tb_position();
});
$('.plugins').on( 'click', 'a.thickbox', function() {
$('.plugin-card').on( 'click', 'a.thickbox', function() {
tb_click.call(this);
$('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
$('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong>&nbsp;' + $(this).attr('title') );
$('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong>&nbsp;' + $(this).data( 'title' ) );
return false;
});