← All changes
|
src/task-list/application/tasks/child-tasks/child-task-trait.php
+7
-1
27.5
→
trunk
View file →
| @@ -66,10 +66,16 @@ | ||
| 66 | 66 | * |
| 67 | 67 | * @return Copy_Set |
| 68 | 68 | */ |
| 69 | 69 | public function get_copy_set(): Copy_Set { |
| 70 | + $title = \html_entity_decode( $this->content_item_data->get_title(), \ENT_QUOTES, 'UTF-8' ); | |
| 71 | + if ( $title === '' ) { | |
| 72 | + // Mirror WordPress' own untitled-post convention so screen readers have text content. | |
| 73 | + $title = \__( '(no title)', 'wordpress-seo' ); | |
| 74 | + } | |
| 75 | + | |
| 70 | 76 | return new Copy_Set( |
| 71 | - \html_entity_decode( $this->content_item_data->get_title(), \ENT_QUOTES, 'UTF-8' ), | |
| 77 | + $title, | |
| 72 | 78 | $this->parent_task->get_copy_set()->get_about(), |
| 73 | 79 | ); |
| 74 | 80 | } |
| 75 | 81 | } |