Accessibility: Remove title attributes from the Terms list table.
Fixes #35187. Built from https://develop.svn.wordpress.org/trunk@36265 git-svn-id: http://core.svn.wordpress.org/trunk@36232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
876ab5c293
commit
5bd888497d
|
@ -375,7 +375,13 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||||
get_edit_term_link( $tag->term_id, $taxonomy, $this->screen->post_type )
|
get_edit_term_link( $tag->term_id, $taxonomy, $this->screen->post_type )
|
||||||
);
|
);
|
||||||
|
|
||||||
$out = '<strong><a class="row-title" href="' . esc_url( $edit_link ) . '" title="' . esc_attr( sprintf( __( 'Edit “%s”' ), $name ) ) . '">' . $name . '</a></strong><br />';
|
$out = sprintf(
|
||||||
|
'<strong><a class="row-title" href="%s" aria-label="%s">%s</a></strong><br />',
|
||||||
|
esc_url( $edit_link ),
|
||||||
|
/* translators: %s: taxonomy term name */
|
||||||
|
esc_attr( sprintf( __( '“%s” (Edit)' ), $tag->name ) ),
|
||||||
|
$name
|
||||||
|
);
|
||||||
|
|
||||||
$out .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">';
|
$out .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">';
|
||||||
$out .= '<div class="name">' . $qe_data->name . '</div>';
|
$out .= '<div class="name">' . $qe_data->name . '</div>';
|
||||||
|
@ -429,13 +435,38 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||||
|
|
||||||
$actions = array();
|
$actions = array();
|
||||||
if ( current_user_can( $tax->cap->edit_terms ) ) {
|
if ( current_user_can( $tax->cap->edit_terms ) ) {
|
||||||
$actions['edit'] = '<a href="' . esc_url( $edit_link ) . '">' . __( 'Edit' ) . '</a>';
|
$actions['edit'] = sprintf(
|
||||||
$actions['inline hide-if-no-js'] = '<a href="#" class="editinline aria-button-if-js">' . __( 'Quick Edit' ) . '</a>';
|
'<a href="%s" aria-label="%s">%s</a>',
|
||||||
|
esc_url( $edit_link ),
|
||||||
|
/* translators: %s: taxonomy term name */
|
||||||
|
esc_attr( sprintf( __( 'Edit “%s”' ), $tag->name ) ),
|
||||||
|
__( 'Edit' )
|
||||||
|
);
|
||||||
|
$actions['inline hide-if-no-js'] = sprintf(
|
||||||
|
'<a href="#" class="editinline aria-button-if-js" aria-label="%s">%s</a>',
|
||||||
|
/* translators: %s: taxonomy term name */
|
||||||
|
esc_attr( sprintf( __( 'Quick edit “%s” inline' ), $tag->name ) ),
|
||||||
|
__( 'Quick Edit' )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term ) {
|
||||||
|
$actions['delete'] = sprintf(
|
||||||
|
'<a href="%s" class="delete-tag aria-button-if-js" aria-label="%s">%s</a>',
|
||||||
|
wp_nonce_url( "edit-tags.php?action=delete&taxonomy=$taxonomy&tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id ),
|
||||||
|
/* translators: %s: taxonomy term name */
|
||||||
|
esc_attr( sprintf( __( 'Delete “%s”' ), $tag->name ) ),
|
||||||
|
__( 'Delete' )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if ( $tax->public ) {
|
||||||
|
$actions['view'] = sprintf(
|
||||||
|
'<a href="%s" aria-label="%s">%s</a>',
|
||||||
|
get_term_link( $tag ),
|
||||||
|
/* translators: %s: taxonomy term name */
|
||||||
|
esc_attr( sprintf( __( 'View “%s” archive' ), $tag->name ) ),
|
||||||
|
__( 'View' )
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term )
|
|
||||||
$actions['delete'] = "<a class='delete-tag aria-button-if-js' href='" . wp_nonce_url( "edit-tags.php?action=delete&taxonomy=$taxonomy&tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id ) . "'>" . __( 'Delete' ) . "</a>";
|
|
||||||
if ( $tax->public )
|
|
||||||
$actions['view'] = '<a href="' . get_term_link( $tag ) . '">' . __( 'View' ) . '</a>';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the action links displayed for each term in the Tags list table.
|
* Filter the action links displayed for each term in the Tags list table.
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.5-alpha-36264';
|
$wp_version = '4.5-alpha-36265';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue