Administration: In taxonomy list tables, display a dash instead of a blank space and add "No description" as a screen reader text when the term description is blank.

Props pratikgandhi, yahil.
Fixes #40659.
Built from https://develop.svn.wordpress.org/trunk@40957


git-svn-id: http://core.svn.wordpress.org/trunk@40807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2017-06-27 00:34:41 +00:00
parent 25e94961b4
commit 01a6f4d38e
2 changed files with 6 additions and 2 deletions

View File

@ -501,7 +501,11 @@ class WP_Terms_List_Table extends WP_List_Table {
* @return string * @return string
*/ */
public function column_description( $tag ) { public function column_description( $tag ) {
if ( $tag->description ) {
return $tag->description; return $tag->description;
} else {
return '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . __( 'No description' ) . '</span>';
}
} }
/** /**

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.9-alpha-40956'; $wp_version = '4.9-alpha-40957';
/** /**
* 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.