Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 3.1
-
Fix Version/s: 3.1
-
Component/s: Themes
-
Testing Instructions:
- Log in
- Open the user menu
- Inspect using browser tools
- Confirm that there is an data-title relevant to the user menu item
-
Affected Branches:MOODLE_31_STABLE
-
Fixed Branches:MOODLE_31_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-53181-master -
Pull Master Diff URL:
Description
At the moment the User Menu, and its menu items are dynamically created but they have no useful selector attributes (e.g. class, data, or id).
This makes them very difficult to interact with in JavaScript.
It would be very helpful if we added some form of identification to the list item, or failing that, the anchor.
I imagine that this could be as simple as the language string used:
<li role="presentation" data-title="mymoodle,admin">
This will require changes in user_get_user_navigation_info(), and in the user_menu() output renderer.