Add aria-label to each box of the event grid

refs #8458
This commit is contained in:
Johannes Meyer 2015-02-23 17:14:40 +01:00
parent 49e7964355
commit b626a96e16
1 changed files with 9 additions and 8 deletions

View File

@ -122,17 +122,18 @@ class HistoryColorGrid extends AbstractWidget {
{
if (array_key_exists($day, $this->data) && $this->data[$day]['value'] > 0) {
$entry = $this->data[$day];
return'<a ' .
'style="background-color:' . $this->calculateColor($entry['value']) . '; '
. ' opacity: ' . $this->opacity . ';"' .
return '<a ' .
'style="background-color: ' . $this->calculateColor($entry['value']) . ';'
. ' opacity: ' . $this->opacity . ';" ' .
'aria-label="' . $entry['caption'] . '" ' .
'title="' . $entry['caption'] . '" ' .
'href="' . $entry['url'] . '"' .
'>&nbsp;</a>';
} else {
return '<a ' .
'style="background-color:' . $this->calculateColor(0) . '; ' . ' opacity: ' . $this->opacity . ';" ' .
'title="No entries for ' . $day . '" ' .
'></a>';
} else {
return '<span ' .
'style="background-color: ' . $this->calculateColor(0) . '; opacity: ' . $this->opacity . ';" ' .
'title="No entries for ' . $day . '" ' .
'></span>';
}
}