mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Added aria-hidden to FontAwesome svg.
This commit is contained in:
@@ -3913,6 +3913,7 @@ class e_parse
|
|||||||
$path .= $dirs[$cat] . '/';
|
$path .= $dirs[$cat] . '/';
|
||||||
$path .= str_replace('fa-', '', $id) . ".svg";
|
$path .= str_replace('fa-', '', $id) . ".svg";
|
||||||
|
|
||||||
|
|
||||||
if ($ret = file_get_contents($path))
|
if ($ret = file_get_contents($path))
|
||||||
{
|
{
|
||||||
$class = 'svg-inline--fa ';
|
$class = 'svg-inline--fa ';
|
||||||
@@ -3920,7 +3921,7 @@ class e_parse
|
|||||||
$class .= ' fa-w-16';
|
$class .= ' fa-w-16';
|
||||||
$class .= !empty($parm['fw']) ? ' fa-fw' : '';
|
$class .= !empty($parm['fw']) ? ' fa-fw' : '';
|
||||||
|
|
||||||
return str_replace('<svg', '<svg class="' . $class . '" role="img" ', $ret);
|
return str_replace('<svg', '<svg class="' . $class . '" role="img" aria-hidden="true" ', $ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@@ -174,7 +174,7 @@ class social_shortcodes extends e_shortcode
|
|||||||
if($ret = file_get_contents($path))
|
if($ret = file_get_contents($path))
|
||||||
{
|
{
|
||||||
$class = 'fa-'.$this->var['id'];
|
$class = 'fa-'.$this->var['id'];
|
||||||
return str_replace('<svg', '<svg class="'.$class.'" role="img" ', $ret);
|
return str_replace('<svg', '<svg class="'.$class.'" role="img" aria-hidden="true" ', $ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user