Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.5.3
-
MOODLE_25_STABLE
-
MOODLE_26_STABLE, MOODLE_27_STABLE
-
MDL-42909-master -
-
5
-
FRONTEND Sprint 13
Description
When you are moving items (using the non-AJAX version), the move targets are written out using code like the following:
<li class="first movehere" title="Move 'AA306 discussion' to this location">
|
<a href="https://learn2acct.open.ac.uk/course/mod.php?movetosection=149146&sesskey=666">
|
<img class="movetarget" src="https://learn2acct.open.ac.uk/theme/image.php/ou/core/1383320278/movehere" title="Move to here" alt="Move to here">
|
</a>
|
</li>
|
As you can see, there is a title attribute on the LI tag which does not make a lot of sense. It should be on the link tag. (Additionally, there is an unnecessary title attribute on the img tag.)
This was caused by MDL-37085.
The previous code was:
<a title="Move 'AA306 discussion' to this location" href="https://learn2.open.ac.uk/course/mod.php?moveto=287791&sesskey=666"><img class="movetarget" src="https://learn2.open.ac.uk/theme/image.php/ou/core/1382685195/movehere" alt="Move to here"></a>
|
This code is correct, with a title attribute on the A tag containing the full text, and an alt attribute (no title) on the IMG tag.
For accessibility reasons, none of these titles are suitable anyway. All links should have different texts so while the longer text includes the name of the item being moved, that doesn't actually help as it's still the same for all of them. An accessible solution would use text like:
'Move item to Week 4 before "Study resources"'
In other words, I didn't describe the item being moved (because they probably know, and it's the same for all of them) but I included the section name of the target location and a relative before/after for the position within that section.
I am not sure whether or not it is worth doing anything about this because I know Moodle HQ is planning to stop supporting the non-JS graceful degradation features. I was thinking about fixing the regression and putting it back to have the right attribute on the right tag, but since it's inaccessible even after doing that (and always was), I don't think I am going to bother...
So probably just filing this bug and leave it for Moodle staff to decide what to do, sorry!
The offending code where it puts the title on the li is course/renderer.php in course_section_cm_list, currently line 1097/1106, btw.