MDL-70829 core: Remove presentation role for decorative images

* An image with non-empty alt text should not have a presentation role.
* An empty alt attribute is sufficient for decorative images. No need to
add a presentation role for them.
* Additionally, if there is already text that is present for an image,
there's no need to add an alt text with the same text. Such images are
decorative and should just have an empty alt text.
This commit is contained in:
Jun Pataleta
2024-04-12 10:42:09 +08:00
parent b621a7e4b3
commit 5289581d06
3 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -11067,7 +11067,7 @@ class admin_setting_php_extension_enabled extends admin_setting {
$o = '';
if (!extension_loaded($this->extension)) {
$warning = $OUTPUT->pix_icon('i/warning', '', '', array('role' => 'presentation')) . ' ' . $this->description;
$warning = $OUTPUT->pix_icon('i/warning', '') . ' ' . $this->description;
$o .= format_admin_setting($this, $this->visiblename, $warning);
}