WordPress.org

Make WordPress Core

Changeset 36265


Ignore:
Timestamp:
01/11/2016 11:30:00 PM (6 years ago)
Author:
afercia
Message:

Accessibility: Remove title attributes from the Terms list table.

Fixes #35187.

File:
1 edited

Legend:

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

    r35947 r36265  
    376376        );
    377377
    378         $out = '<strong><a class="row-title" href="' . esc_url( $edit_link ) . '" title="' . esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $name ) ) . '">' . $name . '</a></strong><br />';
     378        $out = sprintf(
     379            '<strong><a class="row-title" href="%s" aria-label="%s">%s</a></strong><br />',
     380            esc_url( $edit_link ),
     381            /* translators: %s: taxonomy term name */
     382            esc_attr( sprintf( __( '&#8220;%s&#8221; (Edit)' ), $tag->name ) ),
     383            $name
     384        );
    379385
    380386        $out .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">';
     
    430436        $actions = array();
    431437        if ( current_user_can( $tax->cap->edit_terms ) ) {
    432             $actions['edit'] = '<a href="' . esc_url( $edit_link ) . '">' . __( 'Edit' ) . '</a>';
    433             $actions['inline hide-if-no-js'] = '<a href="#" class="editinline aria-button-if-js">' . __( 'Quick&nbsp;Edit' ) . '</a>';
    434         }
    435         if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term )
    436             $actions['delete'] = "<a class='delete-tag aria-button-if-js' href='" . wp_nonce_url( "edit-tags.php?action=delete&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id ) . "'>" . __( 'Delete' ) . "</a>";
    437         if ( $tax->public )
    438             $actions['view'] = '<a href="' . get_term_link( $tag ) . '">' . __( 'View' ) . '</a>';
     438            $actions['edit'] = sprintf(
     439                '<a href="%s" aria-label="%s">%s</a>',
     440                esc_url( $edit_link ),
     441                /* translators: %s: taxonomy term name */
     442                esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $tag->name ) ),
     443                __( 'Edit' )
     444            );
     445            $actions['inline hide-if-no-js'] = sprintf(
     446                '<a href="#" class="editinline aria-button-if-js" aria-label="%s">%s</a>',
     447                /* translators: %s: taxonomy term name */
     448                esc_attr( sprintf( __( 'Quick edit &#8220;%s&#8221; inline' ), $tag->name ) ),
     449                __( 'Quick&nbsp;Edit' )
     450            );
     451        }
     452        if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term ) {
     453            $actions['delete'] = sprintf(
     454                '<a href="%s" class="delete-tag aria-button-if-js" aria-label="%s">%s</a>',
     455                wp_nonce_url( "edit-tags.php?action=delete&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id ),
     456                /* translators: %s: taxonomy term name */
     457                esc_attr( sprintf( __( 'Delete &#8220;%s&#8221;' ), $tag->name ) ),
     458                __( 'Delete' )
     459            );
     460        }
     461        if ( $tax->public ) {
     462            $actions['view'] = sprintf(
     463                '<a href="%s" aria-label="%s">%s</a>',
     464                get_term_link( $tag ),
     465                /* translators: %s: taxonomy term name */
     466                esc_attr( sprintf( __( 'View &#8220;%s&#8221; archive' ), $tag->name ) ),
     467                __( 'View' )
     468            );
     469        }
    439470
    440471        /**
Note: See TracChangeset for help on using the changeset viewer.