MDL-72412 core: Add the image role to informative icon fonts

This commit is contained in:
Jun Pataleta 2021-08-25 13:04:54 +08:00
parent e78184d827
commit 0b2032cb1e
2 changed files with 2 additions and 2 deletions

View File

@ -101,6 +101,6 @@ class printable_test extends \advanced_testcase {
$object->set_filter($filter);
$output = $object->get_output();
$this->assertStringContainsString('<i class="icon fa fa-tachometer fa-fw " title="Total activities" '.
'aria-label="Total activities">', $output);
'role="img" aria-label="Total activities">', $output);
}
}

View File

@ -43,7 +43,7 @@
}}
{{^unmappedIcon}}
<i class="icon fa {{key}} fa-fw {{extraclasses}}" {{#aria-hidden}}aria-hidden="true"{{/aria-hidden}} {{#title}}title="{{title}}"{{/title}} {{#alt}}aria-label="{{alt}}"{{/alt}}></i>
<i class="icon fa {{key}} fa-fw {{extraclasses}}" {{#aria-hidden}}aria-hidden="true"{{/aria-hidden}} {{#title}}title="{{title}}"{{/title}} {{#alt}}role="img" aria-label="{{alt}}"{{/alt}}></i>
{{/unmappedIcon}}
{{#unmappedIcon}}
{{! We cannot include the pix_icon template directly here because we don't have all the mustache helpers loaded. }}