From 3d0fbc833de4470a58617c4759dc1efc8d824f80 Mon Sep 17 00:00:00 2001 From: Johannes Meyer <johannes.meyer@netways.de> Date: Thu, 12 Feb 2015 13:44:01 +0100 Subject: [PATCH 1/4] Hide the Icinga logo from screen readers refs #8360 --- application/layouts/scripts/body.phtml | 2 +- application/views/scripts/authentication/login.phtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/layouts/scripts/body.phtml b/application/layouts/scripts/body.phtml index e5e6ed9da..9f0b78ce9 100644 --- a/application/layouts/scripts/body.phtml +++ b/application/layouts/scripts/body.phtml @@ -44,7 +44,7 @@ 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" alt="<?= t('Dashboard') ?>" /></a> + <div id="logo" data-base-target="_main"><a href="<?= $this->href('/dashboard') ?>"><img aria-hidden="true" src="<?= $this->href('img/logo_icinga-inv.png') ?>" class="logo" alt="<?= t('Dashboard') ?>" /></a> </div> </div> diff --git a/application/views/scripts/authentication/login.phtml b/application/views/scripts/authentication/login.phtml index 805196b96..db0038bf2 100644 --- a/application/views/scripts/authentication/login.phtml +++ b/application/views/scripts/authentication/login.phtml @@ -1,7 +1,7 @@ <div id="login"> <div class="logo"> <div class="image"> - <img class="fade-in one" src="<?= $this->baseUrl('img/logo_icinga_big.png'); ?>" alt="<?= $this->translate('The Icinga logo'); ?>" > + <img aria-hidden="true" class="fade-in one" src="<?= $this->baseUrl('img/logo_icinga_big.png'); ?>" alt="<?= $this->translate('The Icinga logo'); ?>" > </div> </div> <div class="form" data-base-target="layout"> From 9232c5cf22a9fb4dd6a17dc3ab710902509fd9f7 Mon Sep 17 00:00:00 2001 From: Johannes Meyer <johannes.meyer@netways.de> Date: Thu, 12 Feb 2015 13:47:00 +0100 Subject: [PATCH 2/4] Add aria-hidden="true" to all icons that exist only for design reasons refs #8360 --- .../views/scripts/authentication/login.phtml | 4 ++-- .../scripts/config/authentication/reorder.phtml | 2 +- application/views/scripts/config/resource.phtml | 2 +- .../Icinga/Web/Form/Decorator/NoScriptApply.php | 2 +- .../Icinga/Web/Menu/ForeignMenuItemRenderer.php | 2 +- .../Icinga/Web/Menu/MonitoringMenuItemRenderer.php | 4 ++-- library/Icinga/Web/MenuRenderer.php | 6 ++++-- library/Icinga/Web/Widget/Tab.php | 8 ++------ .../forms/Command/Object/CheckNowCommandForm.php | 3 ++- .../views/scripts/alertsummary/index.phtml | 6 +++--- .../application/views/scripts/config/index.phtml | 4 ++-- .../application/views/scripts/hosts/show.phtml | 14 +++++++------- .../application/views/scripts/list/comments.phtml | 2 +- .../views/scripts/list/contactgroups.phtml | 2 +- .../application/views/scripts/list/contacts.phtml | 2 +- .../partials/command/objects-command-form.phtml | 4 ++-- .../application/views/scripts/services/show.phtml | 14 +++++++------- .../scripts/show/components/acknowledgement.phtml | 2 +- .../scripts/show/components/checkstatistics.phtml | 2 +- .../views/scripts/show/components/command.phtml | 2 +- .../views/scripts/show/components/comments.phtml | 2 +- .../views/scripts/show/components/contacts.phtml | 4 ++-- .../views/scripts/show/components/downtime.phtml | 2 +- .../views/scripts/show/components/hostgroups.phtml | 2 +- .../scripts/show/components/servicegroups.phtml | 2 +- public/css/icinga/login.less | 2 +- 26 files changed, 50 insertions(+), 51 deletions(-) diff --git a/application/views/scripts/authentication/login.phtml b/application/views/scripts/authentication/login.phtml index db0038bf2..ebfa1ba2b 100644 --- a/application/views/scripts/authentication/login.phtml +++ b/application/views/scripts/authentication/login.phtml @@ -6,7 +6,7 @@ </div> <div class="form" data-base-target="layout"> <?php if ($requiresSetup): ?> - <p class="config-note"><?= sprintf( + <p tabindex="0" class="config-note"><?= sprintf( $this->translate( 'It appears that you did not configure Icinga Web 2 yet so it\'s not possible to log in without any defined ' . 'authentication method. Please define a authentication method by following the instructions in the' @@ -17,7 +17,7 @@ '</a>' ); ?></p> <?php elseif ($requiresExternalAuth): ?> - <p class="info-box"><span class="icon-info"></span><?= $this->translate( + <p tabindex="0" class="info-box"><i aria-hidden="true" class="icon-info"></i><?= $this->translate( 'You\'re currently not authenticated using any of the web server\'s authentication mechanisms.' . ' Make sure you\'ll configure such, otherwise you\'ll not be able to login.' ); ?></p> diff --git a/application/views/scripts/config/authentication/reorder.phtml b/application/views/scripts/config/authentication/reorder.phtml index 807f80efe..83f285285 100644 --- a/application/views/scripts/config/authentication/reorder.phtml +++ b/application/views/scripts/config/authentication/reorder.phtml @@ -4,7 +4,7 @@ <div class="content" data-base-target="_next"> <p> <a href="<?= $this->href('/config/createAuthenticationBackend'); ?>"> - <?= $this->icon('plus'); ?><?= $this->translate('Create A New Authentication Backend'); ?> + <?= $this->icon('plus', null, array('aria-hidden' => 'true')); ?><?= $this->translate('Create A New Authentication Backend'); ?> </a> </p> <?= $form; ?> diff --git a/application/views/scripts/config/resource.phtml b/application/views/scripts/config/resource.phtml index f93b2af82..384993f52 100644 --- a/application/views/scripts/config/resource.phtml +++ b/application/views/scripts/config/resource.phtml @@ -4,7 +4,7 @@ <div class="content" data-base-target="_next"> <p> <a href="<?= $this->href('/config/createresource'); ?>"> - <?= $this->icon('plus'); ?> <?= $this->translate('Create A New Resource'); ?> + <?= $this->icon('plus', null, array('aria-hidden' => 'true')); ?> <?= $this->translate('Create A New Resource'); ?> </a> </p> <table class="action"> diff --git a/library/Icinga/Web/Form/Decorator/NoScriptApply.php b/library/Icinga/Web/Form/Decorator/NoScriptApply.php index fbc96756b..2ea810e16 100644 --- a/library/Icinga/Web/Form/Decorator/NoScriptApply.php +++ b/library/Icinga/Web/Form/Decorator/NoScriptApply.php @@ -25,7 +25,7 @@ class NoScriptApply extends Zend_Form_Decorator_Abstract { if ($content) { $content .= '<noscript><button name="noscript_apply" style="margin-left: 0.5em;" type="submit" value="1">' - . Icinga::app()->getViewRenderer()->view->icon('refresh.png') . ' ' . t('Apply') + . Icinga::app()->getViewRenderer()->view->icon('refresh.png', null, array('aria-hidden' => 'true')) . ' ' . t('Apply') . '</button></noscript>'; } diff --git a/library/Icinga/Web/Menu/ForeignMenuItemRenderer.php b/library/Icinga/Web/Menu/ForeignMenuItemRenderer.php index 91b31d23d..2ed418bf3 100644 --- a/library/Icinga/Web/Menu/ForeignMenuItemRenderer.php +++ b/library/Icinga/Web/Menu/ForeignMenuItemRenderer.php @@ -16,7 +16,7 @@ class ForeignMenuItemRenderer implements MenuItemRenderer { return sprintf( '<a href="%s" target="_self">%s%s<span></span></a>', $menu->getUrl() ?: '#', - $menu->getIcon() ? '<img src="' . Url::fromPath($menu->getIcon()) . '" class="icon" /> ' : '', + $menu->getIcon() ? '<img aria-hidden="true" src="' . Url::fromPath($menu->getIcon()) . '" class="icon" /> ' : '', htmlspecialchars($menu->getTitle()) ); } diff --git a/library/Icinga/Web/Menu/MonitoringMenuItemRenderer.php b/library/Icinga/Web/Menu/MonitoringMenuItemRenderer.php index cf1673b7a..33e1c6a60 100644 --- a/library/Icinga/Web/Menu/MonitoringMenuItemRenderer.php +++ b/library/Icinga/Web/Menu/MonitoringMenuItemRenderer.php @@ -80,7 +80,7 @@ class MonitoringMenuItemRenderer implements MenuItemRenderer { } if ($menu->getIcon() && strpos($menu->getIcon(), '.') === false) { return sprintf( - '%s <a href="%s" class="icon-%s">%s</a>', + '%s <a href="%s"><i aria-hidden="true" class="icon-%s"></i>%s</a>', $badge, $menu->getUrl() ?: '#', $menu->getIcon(), @@ -92,7 +92,7 @@ class MonitoringMenuItemRenderer implements MenuItemRenderer { '%s<a href="%s">%s%s<span></span></a>', $badge, $menu->getUrl() ?: '#', - $menu->getIcon() ? '<img src="' . Url::fromPath($menu->getIcon()) . '" class="icon" /> ' : '', + $menu->getIcon() ? '<img aria-hidden="true" src="' . Url::fromPath($menu->getIcon()) . '" class="icon" /> ' : '', htmlspecialchars($menu->getTitle()) ); } diff --git a/library/Icinga/Web/MenuRenderer.php b/library/Icinga/Web/MenuRenderer.php index b201c265a..78e910f61 100644 --- a/library/Icinga/Web/MenuRenderer.php +++ b/library/Icinga/Web/MenuRenderer.php @@ -115,7 +115,7 @@ class MenuRenderer extends RecursiveIteratorIterator } if ($child->getIcon() && strpos($child->getIcon(), '.') === false) { return sprintf( - '<a href="%s" class="icon-%s">%s</a>', + '<a href="%s"><i aria-hidden="true" class="icon-%s"></i>%s</a>', $child->getUrl() ?: '#', $child->getIcon(), htmlspecialchars($child->getTitle()) @@ -124,7 +124,9 @@ class MenuRenderer extends RecursiveIteratorIterator return sprintf( '<a href="%s">%s%s</a>', $child->getUrl() ?: '#', - $child->getIcon() ? '<img src="' . Url::fromPath($child->getIcon()) . '" class="icon" /> ' : '', + $child->getIcon() + ? '<img aria-hidden="true" src="' . Url::fromPath($child->getIcon()) . '" class="icon" /> ' + : '', htmlspecialchars($child->getTitle()) ); } diff --git a/library/Icinga/Web/Widget/Tab.php b/library/Icinga/Web/Widget/Tab.php index 5da6a811c..2d24d5f40 100644 --- a/library/Icinga/Web/Widget/Tab.php +++ b/library/Icinga/Web/Widget/Tab.php @@ -215,13 +215,9 @@ class Tab extends AbstractWidget if ($this->icon !== null) { if (strpos($this->icon, '.') === false) { - if ($tagParams && array_key_exists('class', $tagParams)) { - $tagParams['class'] .= ' icon-' . $this->icon; - } else { - $tagParams['class'] = 'icon-' . $this->icon; - } + $caption = $view->icon($this->icon, null, array('aria-hidden' => 'true')) . $caption; } else { - $caption = $view->img($this->icon, array('class' => 'icon')) . $caption; + $caption = $view->img($this->icon, array('aria-hidden' => 'true', 'class' => 'icon')) . $caption; } } if ($this->url !== null) { diff --git a/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php b/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php index 1e6e4d64d..1a39574f6 100644 --- a/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php +++ b/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php @@ -35,7 +35,8 @@ class CheckNowCommandForm extends ObjectsCommandForm 'ignore' => true, 'type' => 'submit', 'value' => $this->translate('Check now'), - 'label' => '<i class="icon-reschedule"></i> ' . $this->translate('Check now'), + 'label' => '<i aria-hidden="true" class="icon-reschedule"></i> ' + . $this->translate('Check now'), 'decorators' => array('ViewHelper'), 'escape' => false, 'class' => 'link-like' diff --git a/modules/monitoring/application/views/scripts/alertsummary/index.phtml b/modules/monitoring/application/views/scripts/alertsummary/index.phtml index dbfff6433..b71456ab6 100644 --- a/modules/monitoring/application/views/scripts/alertsummary/index.phtml +++ b/modules/monitoring/application/views/scripts/alertsummary/index.phtml @@ -42,11 +42,11 @@ <span> <?php if ($this->trend->trend === 'up'): ?> - <?= $this->icon('up-open'); ?> + <?= $this->icon('up-open', null, array('aria-hidden' => 'true')); ?> <?php elseif ($this->trend->trend === 'unchanged'): ?> - <?= $this->icon('right-open'); ?> + <?= $this->icon('right-open', null, array('aria-hidden' => 'true')); ?> <?php else: ?> - <?= $this->icon('down-open'); ?> + <?= $this->icon('down-open', null, array('aria-hidden' => 'true')); ?> <?php endif; ?> </span> </div> diff --git a/modules/monitoring/application/views/scripts/config/index.phtml b/modules/monitoring/application/views/scripts/config/index.phtml index b1729f9b1..a0f922ba4 100644 --- a/modules/monitoring/application/views/scripts/config/index.phtml +++ b/modules/monitoring/application/views/scripts/config/index.phtml @@ -6,7 +6,7 @@ <div class="content" data-base-target="_next"> <p> <a href="<?= $this->href('/monitoring/config/createbackend'); ?>"> - <?= $this->icon('plus'); ?> <?= $this->translate('Create New Monitoring Backend'); ?> + <?= $this->icon('plus', null, array('aria-hidden' => 'true')); ?> <?= $this->translate('Create New Monitoring Backend'); ?> </a> </p> <table class="action"> @@ -38,7 +38,7 @@ <h1><?= $this->translate('Monitoring Instances') ?></h1> <p> <a href="<?= $this->href('/monitoring/config/createinstance'); ?>"> - <?= $this->icon('plus'); ?> <?= $this->translate('Create New Instance'); ?> + <?= $this->icon('plus', null, array('aria-hidden' => 'true')); ?> <?= $this->translate('Create New Instance'); ?> </a> </p> <table class="action"> diff --git a/modules/monitoring/application/views/scripts/hosts/show.phtml b/modules/monitoring/application/views/scripts/hosts/show.phtml index 5e4674523..0da62ad77 100644 --- a/modules/monitoring/application/views/scripts/hosts/show.phtml +++ b/modules/monitoring/application/views/scripts/hosts/show.phtml @@ -31,21 +31,21 @@ <div> <a href="<?= $rescheduleAllLink ?>"> - <?= $this->icon('reschedule') ?> + <?= $this->icon('reschedule', null, array('aria-hidden' => 'true')) ?> <?= $this->translate('Reschedule host checks') ?> </a> </div> <div> <a href="<?= $downtimeAllLink ?>"> - <?= $this->icon('plug') ?> + <?= $this->icon('plug', null, array('aria-hidden' => 'true')) ?> <?= $this->translate('Schedule host downtimes') ?> </a> </div> <div> <a href="<?= $processCheckResultAllLink; ?>"> - <?= $this->icon('reply'); ?> + <?= $this->icon('reply', null, array('aria-hidden' => 'true')); ?> <?= $this->translate('Submit passive check results'); ?> </a> </div> @@ -71,7 +71,7 @@ ), $unhandledCount ) ?>"> - <?= $this->icon('plug') ?> + <?= $this->icon('plug', null, array('aria-hidden' => 'true')) ?> <?= sprintf( $this->translatePlural( 'Schedule downtime for unhandled host problem', @@ -91,7 +91,7 @@ ), $unhandledCount ) ?>"> - <?= $this->icon('ok') ?> + <?= $this->icon('ok', null, array('aria-hidden' => 'true')) ?> <?= sprintf( $this->translatePlural( 'Acknowledge unhandled host problem', @@ -133,7 +133,7 @@ ), $inDowntimeCount ) ?>"> - <?= $this->icon('plug') ?> + <?= $this->icon('plug', null, array('aria-hidden' => 'true')) ?> <?= sprintf( $this->translatePlural( 'List %u host currently in downtime', @@ -158,7 +158,7 @@ ), $commentCount ) ?>"> - <?= $this->icon('comment') ?> + <?= $this->icon('comment', null, array('aria-hidden' => 'true')) ?> <?= sprintf( $this->translatePlural( 'List %u host comment', diff --git a/modules/monitoring/application/views/scripts/list/comments.phtml b/modules/monitoring/application/views/scripts/list/comments.phtml index 857017b4d..7d8fe4646 100644 --- a/modules/monitoring/application/views/scripts/list/comments.phtml +++ b/modules/monitoring/application/views/scripts/list/comments.phtml @@ -59,7 +59,7 @@ <?= $this->link()->host($comment->host, $comment->host_display_name) ?> <?php endif ?> <br> - <?= $this->icon('comment'); ?> <?= isset($comment->author) + <?= $this->icon('comment', null, array('aria-hidden' => 'true')); ?> <?= isset($comment->author) ? '[' . $comment->author . '] ' : ''; ?><?= $this->escape($comment->comment); ?> diff --git a/modules/monitoring/application/views/scripts/list/contactgroups.phtml b/modules/monitoring/application/views/scripts/list/contactgroups.phtml index f25548c52..99d070c31 100644 --- a/modules/monitoring/application/views/scripts/list/contactgroups.phtml +++ b/modules/monitoring/application/views/scripts/list/contactgroups.phtml @@ -20,7 +20,7 @@ foreach ($groupData as $groupName => $groupInfo): ?> <div class="box contents"> <?php foreach ($groupInfo['contacts'] as $c): ?> <div class="box entry"> - <img src="<?= $this->href('/static/gravatar', array('email' => $c->contact_email )) ?>" /> + <img aria-hidden="true" src="<?= $this->href('/static/gravatar', array('email' => $c->contact_email )) ?>" /> <a href="<?= $this->href( 'monitoring/show/contact', array('contact' => $c->contact_name) diff --git a/modules/monitoring/application/views/scripts/list/contacts.phtml b/modules/monitoring/application/views/scripts/list/contacts.phtml index d8d2a2e72..292617493 100644 --- a/modules/monitoring/application/views/scripts/list/contacts.phtml +++ b/modules/monitoring/application/views/scripts/list/contacts.phtml @@ -14,7 +14,7 @@ } foreach ($contacts as $contact): ?> <div class="contact"> - <img src="<?= $this->href('/static/gravatar', array('email' => $contact->contact_email )) ?>" /> + <img aria-hidden="true" src="<?= $this->href('/static/gravatar', array('email' => $contact->contact_email )) ?>" /> <a href="<?= $this->href( 'monitoring/show/contact', array('contact' => $contact->contact_name) diff --git a/modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml b/modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml index da58fc9cb..a92302775 100644 --- a/modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml +++ b/modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml @@ -9,8 +9,8 @@ <table class="objectlist"> <thead> <tr> - <th><?= $this->icon('host'); ?> <?= $this->translate('Host'); ?></th> - <th><?= $this->icon('conf'); ?> <?= $this->translate('Service'); ?></th> + <th><?= $this->icon('host', null, array('aria-hidden' => 'true')); ?> <?= $this->translate('Host'); ?></th> + <th><?= $this->icon('conf', null, array('aria-hidden' => 'true')); ?> <?= $this->translate('Service'); ?></th> </tr> </thead> <tbody> diff --git a/modules/monitoring/application/views/scripts/services/show.phtml b/modules/monitoring/application/views/scripts/services/show.phtml index 229d63f0d..44951735a 100644 --- a/modules/monitoring/application/views/scripts/services/show.phtml +++ b/modules/monitoring/application/views/scripts/services/show.phtml @@ -19,21 +19,21 @@ <div> <a href="<?= $rescheduleAllLink ?>"> - <?= $this->icon('reschedule') ?> + <?= $this->icon('reschedule', null, array('aria-hidden' => 'true')) ?> <?= $this->translate('Reschedule service checks') ?> </a> </div> <div> <a href="<?= $downtimeAllLink ?>"> - <?= $this->icon('plug') ?> + <?= $this->icon('plug', null, array('aria-hidden' => 'true')) ?> <?= $this->translate('Schedule service downtimes') ?> </a> </div> <div> <a href="<?= $processCheckResultAllLink; ?>"> - <?= $this->icon('reply'); ?> + <?= $this->icon('reply', null, array('aria-hidden' => 'true')); ?> <?= $this->translate('Submit passive check results'); ?> </a> </div> @@ -59,7 +59,7 @@ ), $unhandledCount ) ?>"> - <?= $this->icon('plug') ?> + <?= $this->icon('plug', null, array('aria-hidden' => 'true')) ?> <?= sprintf( $this->translatePlural( 'Schedule downtime for unhandled service problem', @@ -79,7 +79,7 @@ ), $unhandledCount ) ?>"> - <?= $this->icon('ok') ?> + <?= $this->icon('ok', null, array('aria-hidden' => 'true')) ?> <?= sprintf( $this->translatePlural( 'Acknowledge unhandled service problem', @@ -119,7 +119,7 @@ $inDowntimeCount ), $inDowntimeCount) ?>"> - <?= $this->icon('plug') ?> + <?= $this->icon('plug', null, array('aria-hidden' => 'true')) ?> <?= sprintf( $this->translatePlural( 'List %u service currently in downtime', @@ -143,7 +143,7 @@ ), $commentCount ) ?>"> - <?= $this->icon('comment') ?> + <?= $this->icon('comment', null, array('aria-hidden' => 'true')) ?> <?= sprintf( $this->translatePlural( 'List %u service comment', diff --git a/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml b/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml index 8da35590f..c5c2a5667 100644 --- a/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml +++ b/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml @@ -36,7 +36,7 @@ if ($object->acknowledged): ?> } ?> <a href="<?= $ackLink ?>" data-base-target="_self"> - <?= $this->icon('ok') ?> <?= $this->translate('Acknowledge') ?> + <?= $this->icon('ok', null, array('aria-hidden' => 'true')) ?> <?= $this->translate('Acknowledge') ?> </a> <?php } else { echo '-'; diff --git a/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml b/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml index ec0c2792a..5545790ab 100644 --- a/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml +++ b/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml @@ -40,7 +40,7 @@ if ($object->getType() === $object::TYPE_HOST) { } ?> <a href="<?= $reschedule ?>" data-base-target="_self"> - <?= $this->icon('reschedule') ?> + <?= $this->icon('reschedule', null, array('aria-hidden' => 'true')) ?> <?= $this->translate('Reschedule') ?> </a> <?php } // endif ?> diff --git a/modules/monitoring/application/views/scripts/show/components/command.phtml b/modules/monitoring/application/views/scripts/show/components/command.phtml index a74b5b884..1041b7ff6 100644 --- a/modules/monitoring/application/views/scripts/show/components/command.phtml +++ b/modules/monitoring/application/views/scripts/show/components/command.phtml @@ -22,7 +22,7 @@ $command = array_shift($parts); ); } ?> <a href="<?= $processCheckResult ?>" data-base-target="_self"> - <?= $this->icon('reply') ?> + <?= $this->icon('reply', null, array('aria-hidden' => 'true')) ?> <?= $this->translate('Process check result') ?> </a> <?php endif ?> diff --git a/modules/monitoring/application/views/scripts/show/components/comments.phtml b/modules/monitoring/application/views/scripts/show/components/comments.phtml index a6503a70b..9973ff037 100644 --- a/modules/monitoring/application/views/scripts/show/components/comments.phtml +++ b/modules/monitoring/application/views/scripts/show/components/comments.phtml @@ -16,7 +16,7 @@ } ?> <a href="<?= $addCommentLink ?>" data-base-target="_self"> - <?= $this->icon('comment') ?> + <?= $this->icon('comment', null, array('aria-hidden' => 'true')) ?> <?= $this->translate('Add comment') ?> </a> <?php } else { diff --git a/modules/monitoring/application/views/scripts/show/components/contacts.phtml b/modules/monitoring/application/views/scripts/show/components/contacts.phtml index d220968e5..68e6423ff 100644 --- a/modules/monitoring/application/views/scripts/show/components/contacts.phtml +++ b/modules/monitoring/application/views/scripts/show/components/contacts.phtml @@ -12,7 +12,7 @@ if (! empty($object->contacts)) { printf( "<tr><th>%s</th><td>%s %s</td></tr>\n", $this->translate('Contacts'), - $this->icon('user'), + $this->icon('user', null, array('aria-hidden' => 'true')), implode(', ', $list) ); @@ -31,7 +31,7 @@ if (! empty($object->contactgroups)) { printf( "<tr><th>%s</th><td>%s %s</td></tr>\n", $this->translate('Contactgroups'), - $this->icon('users'), + $this->icon('users', null, array('aria-hidden' => 'true')), implode(', ', $list) ); diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index 4aa1e21c1..f838b3d61 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -16,7 +16,7 @@ } ?> <a href="<?= $scheduleDowntimeLink ?>" data-base-target="_self"> - <?= $this->icon('plug') ?> + <?= $this->icon('plug', null, array('aria-hidden' => 'true')) ?> <?= $this->translate('Schedule downtime') ?> </a> <?php } else { diff --git a/modules/monitoring/application/views/scripts/show/components/hostgroups.phtml b/modules/monitoring/application/views/scripts/show/components/hostgroups.phtml index 165df627a..3a41f0cd8 100644 --- a/modules/monitoring/application/views/scripts/show/components/hostgroups.phtml +++ b/modules/monitoring/application/views/scripts/show/components/hostgroups.phtml @@ -11,7 +11,7 @@ foreach ($object->hostgroups as $name => $alias) { printf( "<tr><th>%s</th><td>%s %s</td></tr>\n", $this->translate('Hostgroups'), - $this->icon('host'), + $this->icon('host', null, array('aria-hidden' => 'true')), implode(', ', $list) ); diff --git a/modules/monitoring/application/views/scripts/show/components/servicegroups.phtml b/modules/monitoring/application/views/scripts/show/components/servicegroups.phtml index 50b71d839..01de6d71c 100644 --- a/modules/monitoring/application/views/scripts/show/components/servicegroups.phtml +++ b/modules/monitoring/application/views/scripts/show/components/servicegroups.phtml @@ -12,7 +12,7 @@ foreach ($object->servicegroups as $name => $alias) { printf( "<tr><th>%s</th><td>%s %s</td></tr>\n", $this->translate('Servicegroups'), - $this->icon('services'), + $this->icon('services', null, array('aria-hidden' => 'true')), implode(', ', $list) ); diff --git a/public/css/icinga/login.less b/public/css/icinga/login.less index d09a9f6e0..f6144bd68 100644 --- a/public/css/icinga/login.less +++ b/public/css/icinga/login.less @@ -131,7 +131,7 @@ height: 2.2em; margin: 0 auto 2.5em; - span.icon-info { + i.icon-info { float: left; height: 100%; } From 1d6c65f7fcf7ab6ec76149618f0a7800477eb86e Mon Sep 17 00:00:00 2001 From: Johannes Meyer <johannes.meyer@netways.de> Date: Thu, 12 Feb 2015 13:47:50 +0100 Subject: [PATCH 3/4] Move the login form's heading above the authentication warnings --- .../views/scripts/authentication/login.phtml | 13 +++---------- public/css/icinga/login.less | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/application/views/scripts/authentication/login.phtml b/application/views/scripts/authentication/login.phtml index ebfa1ba2b..f40f5c4e0 100644 --- a/application/views/scripts/authentication/login.phtml +++ b/application/views/scripts/authentication/login.phtml @@ -5,6 +5,7 @@ </div> </div> <div class="form" data-base-target="layout"> + <h1><?= $this->translate('Welcome to Icinga Web 2'); ?></h1> <?php if ($requiresSetup): ?> <p tabindex="0" class="config-note"><?= sprintf( $this->translate( @@ -22,15 +23,7 @@ . ' Make sure you\'ll configure such, otherwise you\'ll not be able to login.' ); ?></p> <?php endif ?> - <h1><?= $this->translate('Welcome to Icinga Web 2'); ?></h1> - <?php - /* TODO: remove this as soon as notifications and forms are ready */ - if (isset($this->errorInfo)): ?> - <div class="error"> - <?= $this->errorInfo ?> - </div> - <?php endif ?> - <?= $this->form ?> - <div class="footer">Icinga Web 2 © 2013-2015<br><a href="https://www.icinga.org"><?= $this->translate('The Icinga Project'); ?></a></div> + <?= $this->form ?> + <div class="footer">Icinga Web 2 © 2013-2015<br><a href="https://www.icinga.org"><?= $this->translate('The Icinga Project'); ?></a></div> </div> </div> diff --git a/public/css/icinga/login.less b/public/css/icinga/login.less index f6144bd68..0211fdc35 100644 --- a/public/css/icinga/login.less +++ b/public/css/icinga/login.less @@ -129,7 +129,7 @@ p.info-box { width: 50%; height: 2.2em; - margin: 0 auto 2.5em; + margin: 2em auto 2.5em; i.icon-info { float: left; From d37129dfed21b5ce788cba6e485142f95c9a552c Mon Sep 17 00:00:00 2001 From: Johannes Meyer <johannes.meyer@netways.de> Date: Thu, 12 Feb 2015 13:48:20 +0100 Subject: [PATCH 4/4] Remove the old and redundant config/show-configuration view script --- .../scripts/config/show-configuration.phtml | 28 ------------------- 1 file changed, 28 deletions(-) delete mode 100644 modules/monitoring/application/views/scripts/config/show-configuration.phtml diff --git a/modules/monitoring/application/views/scripts/config/show-configuration.phtml b/modules/monitoring/application/views/scripts/config/show-configuration.phtml deleted file mode 100644 index 4cd01441c..000000000 --- a/modules/monitoring/application/views/scripts/config/show-configuration.phtml +++ /dev/null @@ -1,28 +0,0 @@ -<div class="alert alert-error"> - <h4><i><i class="icinga-icon-error"></i> </i> Saving "<?= $this->escape($this->file); ?>" failed</h4> - <br/> - <p> - Your <?= $this->escape($this->file); ?> configuration couldn't be stored (error: "<?= $this->exceptionMessage; ?>").<br/> - This could have one or more of the following reasons: - </p> - <ul> - <li>You don't have file-system permissions to write to the <?= $this->escape($this->file); ?> file</li> - <li>Something went wrong while writing the file</li> - <li>There's an application error preventing you from persisting the configuration</li> - </ul> -</div> - -<p> - Details can be seen in your application log (if you don't have access to this file, call your administrator in this case). - <br/> - In case you can access the configuration file (config/<?= $this->escape($this->file); ?>) by yourself, you can open it and - insert the config manually: - -</p> -<p> -<pre> - <code> -<?= $this->escape($this->iniConfigurationString); ?> - </code> - </pre> -</p> \ No newline at end of file