From 9db477777ae82cdd152eed57b869c1bdfb8ea902 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 1 Oct 2015 17:49:43 +0200 Subject: [PATCH] Fix notes and action url in detail views refs #5543 --- .../views/scripts/show/components/actions.phtml | 11 ++++++++--- .../views/scripts/show/components/notes.phtml | 13 ++++++------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/actions.phtml b/modules/monitoring/application/views/scripts/show/components/actions.phtml index bffd949dd..f6e6975a3 100644 --- a/modules/monitoring/application/views/scripts/show/components/actions.phtml +++ b/modules/monitoring/application/views/scripts/show/components/actions.phtml @@ -8,12 +8,17 @@ foreach ($navigation as $item) { $item->setObject($object); } -// add warning to links that open in new tabs to improve accessibility, as recommended by WCAG20 G201 -$newTabInfo = sprintf(' %s ', $this->translate('opens in new window')); + foreach ($object->getActionUrls() as $i => $link) { $navigation->addItem( - 'Action ' . ($i + 1) . $newTabInfo, + + // add warning to links that open in new tabs to improve accessibility, as recommended by WCAG20 G201 + $this->icon( + 'forward', + $this->translate('Link opens in new window'), + array('aria-label' => $this->translate('Link opens in new window')) + ) . ' Action ' . ($i + 1), array( 'url' => $link, 'target' => '_blank', diff --git a/modules/monitoring/application/views/scripts/show/components/notes.phtml b/modules/monitoring/application/views/scripts/show/components/notes.phtml index 4aa8b6bfc..716eda9e5 100644 --- a/modules/monitoring/application/views/scripts/show/components/notes.phtml +++ b/modules/monitoring/application/views/scripts/show/components/notes.phtml @@ -15,15 +15,14 @@ if ($notes) { $links = $object->getNotesUrls(); if (! empty($links)) { - // add warning to links that open in new tabs to improve accessibility, as recommended by WCAG20 G201 - $newTabInfo = sprintf( - ' %s ', - $this->translate('opens in new window') - ); - foreach ($links as $link) { $navigation->addItem( - $this->escape($link) . $newTabInfo, + // add warning to links that open in new tabs to improve accessibility, as recommended by WCAG20 G201 + $this->icon( + 'forward', + $this->translate('Link opens in new window'), + array('aria-label' => $this->translate('Link opens in new window')) + ) . $this->escape($link), array( 'url' => $link, 'target' => '_blank',