parent
f886172c24
commit
9db477777a
|
@ -8,12 +8,17 @@ foreach ($navigation as $item) {
|
||||||
$item->setObject($object);
|
$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) {
|
foreach ($object->getActionUrls() as $i => $link) {
|
||||||
$navigation->addItem(
|
$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(
|
array(
|
||||||
'url' => $link,
|
'url' => $link,
|
||||||
'target' => '_blank',
|
'target' => '_blank',
|
||||||
|
|
|
@ -15,15 +15,14 @@ if ($notes) {
|
||||||
|
|
||||||
$links = $object->getNotesUrls();
|
$links = $object->getNotesUrls();
|
||||||
if (! empty($links)) {
|
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) {
|
foreach ($links as $link) {
|
||||||
$navigation->addItem(
|
$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(
|
array(
|
||||||
'url' => $link,
|
'url' => $link,
|
||||||
'target' => '_blank',
|
'target' => '_blank',
|
||||||
|
|
Loading…
Reference in New Issue