1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Added aria-hidden to FontAwesome svg.

This commit is contained in:
Cameron
2022-06-05 17:56:32 -07:00
parent 72cdef912a
commit fb529a536d
2 changed files with 3 additions and 2 deletions

View File

@@ -3913,6 +3913,7 @@ class e_parse
$path .= $dirs[$cat] . '/';
$path .= str_replace('fa-', '', $id) . ".svg";
if ($ret = file_get_contents($path))
{
$class = 'svg-inline--fa ';
@@ -3920,7 +3921,7 @@ class e_parse
$class .= ' fa-w-16';
$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;

View File

@@ -174,7 +174,7 @@ class social_shortcodes extends e_shortcode
if($ret = file_get_contents($path))
{
$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);
}
}