MDL-62680 output: Only hide icons with no label
For accessibility we don't want to read an icon with a label immediately next to the label, but in this case it's clearer for the icon to have no alt text / title for both screen readers and non-screen readers. Worse is not reading important information just because it's displayed as an icon.
This commit is contained in:
@@ -444,6 +444,9 @@ class icon_system_fontawesome extends icon_system_font {
|
||||
if (!$subpix->is_mapped()) {
|
||||
$data['unmappedIcon'] = $icon->export_for_template($output);
|
||||
}
|
||||
if (isset($icon->attributes['aria-hidden'])) {
|
||||
$data['aria-hidden'] = $icon->attributes['aria-hidden'];
|
||||
}
|
||||
return $output->render_from_template('core/pix_icon_fontawesome', $data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user