[icinga-checkins] icinga.org: icingaweb2/feature/link-labels-8458: Header: Add header semantic to roles configuration

git at icinga.org git at icinga.org
Tue Feb 24 09:12:01 CET 2015


Module: icingaweb2
Branch: feature/link-labels-8458
Commit: 7644888f25f0301945862d15f29d401aaacb96a5
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=7644888f25f0301945862d15f29d401aaacb96a5

Author: Marius Hein <marius.hein at netways.de>
Date:   Fri Feb 13 16:19:28 2015 +0100

Header: Add header semantic to roles configuration

refs #7976

---

 application/controllers/RolesController.php  |    1 +
 application/views/scripts/roles/index.phtml  |   17 ++++++++++++++++-
 application/views/scripts/roles/new.phtml    |    4 +++-
 application/views/scripts/roles/remove.phtml |    4 +++-
 application/views/scripts/roles/update.phtml |    4 +++-
 5 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/application/controllers/RolesController.php b/application/controllers/RolesController.php
index 7b66b1f..097c79e 100644
--- a/application/controllers/RolesController.php
+++ b/application/controllers/RolesController.php
@@ -45,6 +45,7 @@ class RolesController extends ActionController
             'title' => $this->translate('Roles'),
             'url'   => 'roles'
         ));
+        $this->getTabs()->setTitle($this->translate('Role Configuration'));
     }
 
     /**
diff --git a/application/views/scripts/roles/index.phtml b/application/views/scripts/roles/index.phtml
index c08a0b6..4ff2da8 100644
--- a/application/views/scripts/roles/index.phtml
+++ b/application/views/scripts/roles/index.phtml
@@ -1,8 +1,20 @@
 <div class="controls" data-base-target="_main">
     <?= $tabs ?>
-    <h1><?= $this->translate('Roles') ?></h1>
 </div>
 <div class="content">
+    <h1 tabindex="-1" id="roles-index">
+        <?= $this->translate('Roles') ?>
+    </h1>
+    <div class="skip-links skip-links-inline">
+        <h2 class="sr-only"><?= $this->translate('Skip Links'); ?></h2>
+        <ul>
+            <li>
+                <a tabindex="0" href="#roles-index-new">
+                    <?= t('Skip To Create New Role'); ?>
+                </a>
+            </li>
+        </ul>
+    </div>
     <div>
         <?php /** @var \Icinga\Application\Config $roles */ if ($roles->isEmpty()): ?>
             <?= $this->translate('No roles found.') ?>
@@ -64,6 +76,9 @@
                 </tbody>
             </table>
         <?php endif ?>
+        <h2 tabindex="-1" id="roles-index-new" class="sr-only">
+            <?= $this->translate('Create New Role'); ?>
+        </h2>
         <a data-base-target="_next" href="<?= $this->href('roles/new') ?>">
             <?= $this->translate('New Role') ?>
         </a>
diff --git a/application/views/scripts/roles/new.phtml b/application/views/scripts/roles/new.phtml
index 4c21c6f..d18ada1 100644
--- a/application/views/scripts/roles/new.phtml
+++ b/application/views/scripts/roles/new.phtml
@@ -1,7 +1,9 @@
 <div class="controls">
     <?= $tabs->showOnlyCloseButton() ?>
-    <h1><?= $this->translate('New Role') ?></h1>
 </div>
 <div class="content">
+    <h1 tabindex="-1" id="roles-new">
+        <?= $this->translate('New Role') ?>
+    </h1>
     <?= $form ?>
 </div>
diff --git a/application/views/scripts/roles/remove.phtml b/application/views/scripts/roles/remove.phtml
index 4abff56..432c360 100644
--- a/application/views/scripts/roles/remove.phtml
+++ b/application/views/scripts/roles/remove.phtml
@@ -1,7 +1,9 @@
 <div class="controls">
     <?= $tabs->showOnlyCloseButton() ?>
-    <h1><?= sprintf($this->translate('Remove Role %s'), $name) ?></h1>
 </div>
 <div class="content">
+    <h1 tabindex="-1" id="roles-remove">
+        <?= sprintf($this->translate('Remove Role %s'), $name) ?>
+    </h1>
     <?= $form ?>
 </div>
diff --git a/application/views/scripts/roles/update.phtml b/application/views/scripts/roles/update.phtml
index f48f1ca..32ab7d0 100644
--- a/application/views/scripts/roles/update.phtml
+++ b/application/views/scripts/roles/update.phtml
@@ -1,7 +1,9 @@
 <div class="controls">
     <?= $tabs->showOnlyCloseButton() ?>
-    <h1><?= sprintf($this->translate('Update Role %s'), $name) ?></h1>
 </div>
 <div class="content">
+    <h1 tabindex="-1" id="roles-update">
+        <?= sprintf($this->translate('Update Role %s'), $name) ?>
+    </h1>
     <?= $form ?>
 </div>



More information about the icinga-checkins mailing list