Skip to content

Commit

Permalink
Fix notes and action url in detail views
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
majentsch committed Oct 1, 2015
1 parent f886172 commit 9db4777
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
Expand Up @@ -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('<span class="info-box display-on-hover"> %s </span>', $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',
Expand Down
Expand Up @@ -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(
'<span class="info-box display-on-hover"> %s </span>',
$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',
Expand Down

0 comments on commit 9db4777

Please sign in to comment.