MDL-68135 output: remove the presentation role from user pic

"presentation" is not a valid role for the img element.
Moreover, it doesn't make sense to have both role="presentation" and
aria-hidden="true" for an element at the same time.
For more info please see:
https://timwright.org/blog/2016/11/19/difference-rolepresentation-aria-hiddentrue/
This commit is contained in:
Shamim Rezaie
2020-03-10 19:06:01 +11:00
parent 9ce2442ea9
commit 4293339fc9
-1
View File
@@ -2526,7 +2526,6 @@ class core_renderer extends renderer_base {
$attributes = array('src' => $src, 'class' => $class, 'width' => $size, 'height' => $size);
if (!$userpicture->visibletoscreenreaders) {
$attributes['role'] = 'presentation';
$alt = '';
$attributes['aria-hidden'] = 'true';
}