mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
Do not add aria-label to icons and images with titles if aria-hidden is set
This commit is contained in:
parent
f2259557c8
commit
4f0bddd7da
@ -32,7 +32,7 @@ class Help extends Zend_Form_Decorator_Abstract
|
|||||||
*
|
*
|
||||||
* @param bool $state
|
* @param bool $state
|
||||||
*
|
*
|
||||||
* @return Feedback
|
* @return Help
|
||||||
*/
|
*/
|
||||||
public function setAccessible($state = true)
|
public function setAccessible($state = true)
|
||||||
{
|
{
|
||||||
@ -85,7 +85,7 @@ class Help extends Zend_Form_Decorator_Abstract
|
|||||||
. '</span>' . $content;
|
. '</span>' . $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = $this->getView()->icon('help', $description) . $content;
|
$content = $this->getView()->icon('help', $description, array('aria-hidden' => 'true')) . $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $content;
|
return $content;
|
||||||
|
@ -54,7 +54,7 @@ $this->addHelperFunction('img', function ($url, $params = null, array $propertie
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists('title', $properties)) {
|
if (array_key_exists('title', $properties)) {
|
||||||
if (! array_key_exists('aria-label', $properties)) {
|
if (! array_key_exists('aria-label', $properties) && !array_key_exists('aria-hidden', $properties)) {
|
||||||
$properties['aria-label'] = $properties['title'];
|
$properties['aria-label'] = $properties['title'];
|
||||||
}
|
}
|
||||||
} elseif (! array_key_exists('aria-hidden', $properties)) {
|
} elseif (! array_key_exists('aria-hidden', $properties)) {
|
||||||
@ -83,7 +83,7 @@ $this->addHelperFunction('icon', function ($img, $title = null, array $propertie
|
|||||||
$properties['role'] = 'img';
|
$properties['role'] = 'img';
|
||||||
$properties['title'] = $title;
|
$properties['title'] = $title;
|
||||||
|
|
||||||
if (! array_key_exists('aria-label', $properties)) {
|
if (! array_key_exists('aria-label', $properties) && !array_key_exists('aria-hidden', $properties)) {
|
||||||
$properties['aria-label'] = $title;
|
$properties['aria-label'] = $title;
|
||||||
}
|
}
|
||||||
} elseif (! array_key_exists('aria-hidden', $properties)) {
|
} elseif (! array_key_exists('aria-hidden', $properties)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user