- if ( $this->is_trash )
- $actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=untrash&post=$post->ID", 'untrash-post_' . $post->ID ) . "'>" . __( 'Restore' ) . "</a>";
- elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH )
- $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID ) . "'>" . __( 'Trash' ) . "</a>";
- if ( $this->is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) {
+ if ( $this->is_trash ) {
+ $actions['untrash'] = sprintf(
+ '<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
+ wp_nonce_url( "post.php?action=untrash&post=$post->ID", 'untrash-post_' . $post->ID ),
+ /* translators: %s: attachment title */
+ esc_attr( sprintf( __( 'Restore “%s” from the Trash' ), $att_title ) ),
+ __( 'Restore' )
+ );
+ } elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
+ $actions['trash'] = sprintf(
+ '<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
+ wp_nonce_url( "post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID ),
+ /* translators: %s: attachment title */
+ esc_attr( sprintf( __( 'Move “%s” to the Trash' ), $att_title ) ),
+ _x( 'Trash', 'verb' )
+ );
+ }
+ if ( $this->is_trash || ! EMPTY_TRASH_DAYS || ! MEDIA_TRASH ) {