Skip to content

Commit

Permalink
NavigationRenderer: Do not render an empty header
Browse files Browse the repository at this point in the history
refs #5600
  • Loading branch information
Johannes Meyer committed Sep 7, 2015
1 parent f9441c9 commit 6b13f2a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions library/Icinga/Web/Navigation/Renderer/NavigationRenderer.php
Expand Up @@ -244,11 +244,13 @@ public function beginMarkup()
$this->getElementTag(),
$this->getCssClass() !== null ? ' class="' . $this->getCssClass() . '"' : ''
);
$content[] = sprintf(
'<h%1$d id="navigation" class="sr-only" tabindex="-1">%2$s</h%1$d>',
static::HEADING_RANK,
$this->view()->escape($this->getHeading())
);
if (($heading = $this->getHeading()) !== null) {
$content[] = sprintf(
'<h%1$d id="navigation" class="sr-only" tabindex="-1">%2$s</h%1$d>',
static::HEADING_RANK,
$this->view()->escape($heading)
);
}
$content[] = $this->beginChildrenMarkup();
return join("\n", $content);
}
Expand Down

0 comments on commit 6b13f2a

Please sign in to comment.