summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/theme.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index 0712f8797..268795e17 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -1967,8 +1967,11 @@ function theme_item_list($variables) {
$type = $variables['type'];
$attributes = $variables['attributes'];
+ // Only output the list container and title, if there are any list items.
+ // Check to see whether the block title exists before adding a header.
+ // Empty headers are not semantic and present accessibility challenges.
$output = '<div class="item-list">';
- if (isset($title)) {
+ if (isset($title) && $title !== '') {
$output .= '<h3>' . $title . '</h3>';
}