MDL-70829 core: Remove presentation role for decorative images
commit2c5df73e65e2505f962976e53d99f55d46acde17
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 03:17:05 +0000 (12 11:17 +0800)
treef43710ae936d4f94b614c08aa36d519419e4273c
parente7d21fd9c0c09c2f59ec35ceab4748665af53a83
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