monitoring: Make inline pie charts accessible
This commit is contained in:
parent
1682d8dd67
commit
bc187d91c5
|
@ -74,14 +74,14 @@ class InlinePie extends AbstractWidget
|
|||
* @var string
|
||||
*/
|
||||
private $template =<<<'EOD'
|
||||
<span sparkType="pie" class="sparkline {class}" {title} sparkSliceColors="[{colors}]" values="{data}">
|
||||
<span sparkType="pie" class="sparkline {class}" title="{title}" role="img" aria-label="{title}" sparkSliceColors="[{colors}]" values="{data}">
|
||||
</span>
|
||||
{noscript}
|
||||
EOD;
|
||||
|
||||
private $noscript =<<<'EOD'
|
||||
<noscript>
|
||||
<img width={size} height={size} class="inlinepie {class}" {title} src="{url}" data-icinga-colors="{colors}" data-icinga-values="{data}"/>
|
||||
<img width={size} height={size} class="inlinepie {class}" title="{title}" role="img" aria-label="{title}" src="{url}" data-icinga-colors="{colors}" data-icinga-values="{data}"/>
|
||||
</noscript>
|
||||
EOD;
|
||||
|
||||
|
@ -196,7 +196,7 @@ EOD;
|
|||
*/
|
||||
public function setTitle($title)
|
||||
{
|
||||
$this->title = 'title="' . htmlspecialchars($title) . '"';
|
||||
$this->title = $this->view()->escape($title);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract
|
|||
if ($compact) {
|
||||
$results = array_slice($results, 0, $limit);
|
||||
$title = sprintf($this->view->translate('%d more ...'), $count - $limit);
|
||||
$results[] = '<span title="' . $title . '">...</span>';
|
||||
$results[] = '<span aria-hidden="true" title="' . $title . '">...</span>';
|
||||
} else {
|
||||
$table = array_slice($table, 0, $limit);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue