Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-53181

User menu items need decent selectors/ids

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Component/s: Themes
    • Labels:

      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.

        Attachments

          Activity

            People

            Assignee:
            dobedobedoh Andrew Nicols
            Reporter:
            dobedobedoh Andrew Nicols
            Peer reviewer:
            Ryan Wyllie
            Integrator:
            David Monllaó
            Tester:
            John Okely
            Participants:
            Component watchers:
            Bas Brands
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              23/May/16