From bb5017d54dba898e072f7ffc0eaadfb4044dccbe Mon Sep 17 00:00:00 2001
From: Eric Lippmann <eric.lippmann@netways.de>
Date: Mon, 18 Jan 2016 12:57:56 +0100
Subject: [PATCH] monitoring: Support tab navigation in monitoring health

---
 .../Instance/ToggleInstanceFeaturesCommandForm.php     |  2 --
 .../application/views/scripts/health/info.phtml        |  5 +++--
 .../application/views/scripts/health/stats.phtml       | 10 +++++-----
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php b/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php
index 722f8d0b3..180434564 100644
--- a/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php
@@ -26,9 +26,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
     public function init()
     {
         $this->setUseFormAutosubmit();
-        $this->setTitle($this->translate('Feature Commands'));
         $this->setAttrib('class', 'inline instance-features');
-        $this->loadDefaultDecorators()->getDecorator('description')->setTag('h2');
     }
 
     /**
diff --git a/modules/monitoring/application/views/scripts/health/info.phtml b/modules/monitoring/application/views/scripts/health/info.phtml
index 520cd5f19..f277d4688 100644
--- a/modules/monitoring/application/views/scripts/health/info.phtml
+++ b/modules/monitoring/application/views/scripts/health/info.phtml
@@ -11,7 +11,7 @@ if (! $this->compact): ?>
 <div class="content processinfo grid">
     <div class="boxview">
         <div class="box process col-1-2">
-            <h2><?= $this->translate('Process Info') ?></h2>
+            <h2 tabindex="0"><?= $this->translate('Process Info') ?></h2>
             <table class="avp">
                 <tbody>
                 <tr>
@@ -76,7 +76,8 @@ if (! $this->compact): ?>
             <?php endif ?>
         </div>
         <div class="box features col-1-2">
-            <?= $this->toggleFeaturesForm; ?>
+            <h2 tabindex="0"><?= $this->translate('Feature Commands') ?></h2>
+            <?= $this->toggleFeaturesForm ?>
         </div>
     </div>
 </div>
diff --git a/modules/monitoring/application/views/scripts/health/stats.phtml b/modules/monitoring/application/views/scripts/health/stats.phtml
index 05e6c9085..db9599b26 100644
--- a/modules/monitoring/application/views/scripts/health/stats.phtml
+++ b/modules/monitoring/application/views/scripts/health/stats.phtml
@@ -11,15 +11,15 @@ if (! $this->compact): ?>
 <div class="content stats grid">
     <div class="boxview">
         <div class="box stats col-1-2">
-            <h3><?= $this->unhandledProblems ?> <?= $this->translate('Unhandled Problems:') ?>
-                <span class="badge badge-critical"> <?= $this->unhandledProblems ?> </span>
+            <h3 tabindex="0"><?= $this->unhandledProblems ?> <?= $this->translate('Unhandled Problems:') ?>
+                <span class="badge state-critical"> <?= $this->unhandledProblems ?> </span>
             </h3>
             <table class="avp">
                 <tbody>
                 <tr>
                     <th> <?= $this->translate('Service Problems:') ?> </th>
                     <td>
-                        <span class="badge badge-critical">
+                        <span class="badge state-critical">
                             <?=
                             $this->qlink(
                                 $this->unhandledServiceProblems,
@@ -34,7 +34,7 @@ if (! $this->compact): ?>
                 <tr>
                     <th> <?= $this->translate('Host Problems:') ?> </th>
                     <td>
-                        <span class="badge badge-critical">
+                        <span class="badge state-critical">
                             <?=
                             $this->qlink(
                                 $this->unhandledhostProblems,
@@ -50,7 +50,7 @@ if (! $this->compact): ?>
             </table>
             <br>
 
-            <h3 class="tinystatesummary" data-base-target="_next">
+            <h3 tabindex="0" class="tinystatesummary" data-base-target="_next">
                 <?php $this->stats = $hoststats ?>
                 <?= $this->render('list/components/hostssummary.phtml') ?>
             </h3>