Accessibilité = attribut alt dans les icônes

This commit is contained in:
Fred Tempez 2022-12-13 08:13:16 +01:00
parent 0025dba2aa
commit ec8f179279
1 changed files with 3 additions and 2 deletions

View File

@ -467,12 +467,13 @@ class template
'href' => '',
'attr' => '',
'help' => '',
'id' => ''
'id' => '',
'alt' => '',
], $attributes);
// Traduction de l'aide
$attributes['help'] = helper::translate($attributes['help']);
// Contenu de l'icône
$item = $attributes['href'] ? '<a id="' . $attributes['id'] . '" data-tippy-content="' . $attributes['help'] . '" href="' . $attributes['href'] . '" ' . $attributes['attr'] . ' >' : '';
$item = $attributes['href'] ? '<a id="' . $attributes['id'] . '" data-tippy-content="' . $attributes['help'] . '" alt="' . $attributes['help'] . '" href="' . $attributes['href'] . '" ' . $attributes['attr'] . ' >' : '';
$item .= '<span class="zwiico-' . $ico . ($attributes['margin'] ? ' zwiico-margin-' . $attributes['margin'] : '') . ($attributes['animate'] ? ' animate-spin' : '') . '" style="font-size:' . $attributes['fontSize'] . '"><!----></span>';
$item .= ($attributes['href']) ? '</a>' : '';
return $item;