MDL-70829 core: Remove presentation role for decorative images
commit5289581d06d9b596976984808a4bf805f802d8a5
authorJun Pataleta <jun@moodle.com>
Mon, 18 Mar 2024 11:50:19 +0000 (18 19:50 +0800)
committerJun Pataleta <jun@moodle.com>
Fri, 12 Apr 2024 02:42:09 +0000 (12 10:42 +0800)
tree80ee73afef86a288d28ad69ba05c03fb1c5f2237
parentb621a7e4b3b64359f520addb101f872e6f9a572d
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.
lib/adminlib.php
lib/outputrenderers.php
lib/tests/weblib_test.php