Accessibility: add roles and missing alt tag

This commit is contained in:
Thomas Gelf 2014-06-20 15:02:19 +02:00
parent 2cf79fe9a7
commit c8e2cd109e
3 changed files with 10 additions and 5 deletions

View File

@ -23,14 +23,14 @@ if ($notifications->hasMessages()) {
}
}
?></ul>
<div id="logo" data-base-target="_main"><a href="<?= $this->href('/dashboard') ?>"><img src="<?= $this->href('img/logo_icinga-inv.png') ?>" class="logo" /></a>
<div id="logo" data-base-target="_main"><a href="<?= $this->href('/dashboard') ?>"><img src="<?= $this->href('img/logo_icinga-inv.png') ?>" class="logo" alt="<?= t('Dashboard') ?>" /></a>
</div>
</div>
<div id="sidebar">
<?php echo $this->render('parts/navigation.phtml') ?>
</div>
<div id="main">
<div id="main" role="main">
<div id="col1" class="container<?= $moduleClass ?>"<?php if ($moduleName): ?> data-icinga-module="<?= $moduleName ?>" <?php endif ?> data-icinga-url="<?= Url::fromRequest() ?>" style="display: block">
<?= $this->render('inline.phtml') ?>
</div>

View File

@ -1,4 +1,9 @@
<ul>
<?php
if (! $this->level) {
$this->level = 0;
}
?>
<ul<?= $this->level === 0 ? ' role="navigation"' : '' ?>>
<?php
foreach ($this->items as $item) {
@ -17,7 +22,7 @@ foreach ($this->items as $item) {
if ($item->hasChildren()) {
echo $this->partial(
'parts/menu.phtml',
array('items' => $item->getChildren(), 'url' => $this->url)
array('items' => $item->getChildren(), 'url' => $this->url, 'level' => $this->level + 1)
);
}

View File

@ -13,7 +13,7 @@ $url = Url::fromRequest()->remove('_render')->getRelativeUrl();
$menu = Menu::fromConfig();
?>
<div id="menu" data-base-target="_main">
<form action="<?= $this->href('search') ?>" method="get">
<form action="<?= $this->href('search') ?>" method="get" role="search">
<input type="text" name="q" class="search autofocus" placeholder="<?= $this->translate('Search...') ?>" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
</form>
<?= $this->partial('parts/menu.phtml', array(