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

Appearance of tooltip title attributes in custom menu is incorrect

XMLWordPrintable

    • MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MDL-66849-master
    • Hide

      Before you begin, make sure your Moodle site is using the default Boost theme as some 3rd party themes may override Moodle's default behaviour.

      1. Log into Moodle as a Moodle Administrator.
      2. Navigate to Site Administration > Apperance > Theme > Theme settings
      3. In the Custom menu items field, copy the example included in that section and paste it into the field. For our purpose, you will need to make 2 changes:
        1. Replace the first line with: Moodle community||My community
        2. Replace the 4th line with: -German Moodle Docs|https://docs.moodle.org/de|Documentation in German
      4. Scroll down to the bottom of the page and click Save Changes.
      5. You may need to clear the Moodle cache or your web browser cache (I did not need to).
      6. View the HTML source code for all of the links in the custom menu. You will notice that:
        a) There is now a title attribute for the Moodle community menu item: My community. This is correct.
        b) There are no longer any title attributes for the Moodle Free Support*, *Moodle Development, and Moodle.com menu items. This is correct.
        c) There is still a title attribute for the German Moodle Docs menu item: Documentation in German, and for the Moodle Docs menu item: Moodle Docs.

       

      Show
      Before you begin, make sure your Moodle site is using the default Boost theme as some 3rd party themes may override Moodle's default behaviour. Log into Moodle as a Moodle Administrator . Navigate to Site Administration > Apperance > Theme > Theme settings In the  Custom menu items field, copy the example included in that section and paste it into the field. For our purpose, you will need to make 2 changes: Replace the first line with:  Moodle community||My community Replace the 4th line with: -German Moodle Docs|https://docs.moodle.org/de|Documentation in German Scroll down to the bottom of the page and click Save Changes . You may need to clear the Moodle cache or your web browser cache (I did not need to). View the HTML source code for all of the links in the custom menu. You will notice that: a) There is now a  title  attribute for the Moodle community menu item: My community . This is correct. b) There are no longer any  title attributes for the  Moodle Free Support * , *Moodle Development , and Moodle.com menu items. This is correct. c) There is still a  title attribute for the  German Moodle Docs menu item: Documentation in German , and for the Moodle Docs menu item: Moodle Docs .  

      Custom menu items that don't have an optional tooltip title (3rd parameter) specified, end up with duplicated menu item text in the HTML title attribute. This is an accessibility issue because screen readers will read both the link text and the title attribute resulting in every menu item being repeated twice.

      Parent dropdown custom menu items that should have a title, when specified, do not end up with a title tag.

      What I expected

      If no tooltip title parameter is specified, there should be no title attribute included in the link. If a title was specified, it should be included in the link.

      Before the fix is applied

      Before you begin, make sure your Moodle site is using the default Boost theme as some 3rd party themes may override Moodle's default behaviour.

      1. Log into Moodle as a Moodle Administrator.
      2. Navigate to Site Administration > Apperance > Theme > Theme settings
      3. In the Custom menu items field, copy the example included in that section and paste it into the field. For our purpose, you will need to make 2 changes:
        1. Replace the first line with: Moodle community||My community
        2. Replace the 4th line with: -German Moodle Docs|https://docs.moodle.org/de|Documentation in German
      4. Scroll down to the bottom of the page and click Save Changes.

      Before the fix is applied

      Screenshot

      As you can see in the screenshot of the HTML source code for all of the links in the custom menu:

      1. There is no title attribute for the Moodle community menu item. This is incorrect as title parameter was specified yet none appear (highlighted in yellow).
      2. There are a title attribute for the Moodle Free Support, Moodle Docs, Moodle Development, and Moodle.com menu items. This is incorrect as a ** title parameter was not specified for any of these items and is an accessibility issue.  (highlighted in red).
      3. There is a title attribute for the German Moodle Docs menu item: Documentation in German. This is correct as a title parameter was specified (highlighted in green).

        1. image-2020-02-17-07-47-24-828.png
          287 kB
          Luca Bösch
        2. image-2020-02-17-09-51-41-354.png
          30 kB
          Michael Milette
        3. image-2020-02-18-16-26-51-903.png
          37 kB
          Michael Milette
        4. MDL-66849.jpg
          27 kB
          Anna Carissa Sadia

            michael-milette Michael Milette
            michael-milette Michael Milette
            Luca Bösch Luca Bösch
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 45 minutes
                1h 45m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.