Add appropriate aria labels to donut graphs

This commit is contained in:
Feu Mourek 2019-08-16 09:25:28 +02:00 committed by Johannes Meyer
parent 95328553ca
commit c2568548cf
1 changed files with 2 additions and 0 deletions

View File

@ -268,6 +268,7 @@ class Donut
$svg['content'][] = array(
'tag' => 'circle',
'attributes' => array(
'aria-hidden' => true,
'cx' => 20,
'cy' => 20,
'r' => sprintf('%F', $this->radius),
@ -329,6 +330,7 @@ class Donut
array(
'tag' => 'a',
'attributes' => array(
'aria-label' => $labelBig . ' ' . $labelSmall,
'href' => $this->getLabelBigUrl() ? $this->getLabelBigUrl()->getAbsoluteUrl() : null,
'class' => $this->labelBigEyeCatching
? 'donut-label-big donut-label-big-eye-catching'