Moodle
  1. Moodle
  2. MDL-42239

Calendar tooltips have bad aria-controls values

    Details

    • Testing Instructions:
      Hide
      1. Log in as admin.
      2. Create a few events for upcoming days in future.
      3. Load up a page which has calendar mini block.
      4. Straight after page load inspect page source code and make sure the <a> tag displaying the date elements doesn't have any "aria-controlls" attribute. Check this for date with no events, current date, and a future date with events.
      5. Mouse over current date, make sure <a> tag for the date now has a "Aria-controls" attribute pointing to the panel div.
      6. Mouse over any date without any events, make sure the td tag for the date does not have any "Aria-controls" attribute associated.
      7. Mouse over any other date with events, make sure <a> tag for the date now has a "aria-controls" attribute pointing to the panel div.
      8. Install chrome extension https://chrome.google.com/webstore/detail/accessibility-developer-t/fpkknkljclfencbdbgkenhalefipecmb and run the tool on a freshly loaded page and make sure the test "ARIA state and property values must be valid" passes.

      PS:- There are some rendering issues with the mouseover panel, those are not related to this fix.

      Show
      Log in as admin. Create a few events for upcoming days in future. Load up a page which has calendar mini block. Straight after page load inspect page source code and make sure the <a> tag displaying the date elements doesn't have any "aria-controlls" attribute. Check this for date with no events, current date, and a future date with events. Mouse over current date, make sure <a> tag for the date now has a "Aria-controls" attribute pointing to the panel div. Mouse over any date without any events, make sure the td tag for the date does not have any "Aria-controls" attribute associated. Mouse over any other date with events, make sure <a> tag for the date now has a "aria-controls" attribute pointing to the panel div. Install chrome extension https://chrome.google.com/webstore/detail/accessibility-developer-t/fpkknkljclfencbdbgkenhalefipecmb and run the tool on a freshly loaded page and make sure the test "ARIA state and property values must be valid" passes. PS:- There are some rendering issues with the mouseover panel, those are not related to this fix.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull 2.4 Branch:
      MDL-42239-m24
    • Pull 2.5 Branch:
      MDL-42239-m25
    • Pull Master Branch:
      MDL-42239-master
    • Story Points:
      5
    • Rank:
      53485
    • Sprint:
      BACKEND Sprint 6

      Description

      On a course with the calendar block added and some events added, the aria-controls value points to a non-existant ID.

      The chrome accessibility audit points out the severe nature of this.

        Issue Links

          Activity

          Hide
          Ankit Agarwal added a comment -

          Problem was, the panel div is created only when somone mouse overs the div. In the patch I have made changes so that the "aria-controls" attribute is added only after the div is created.

          I will backport this after review.
          Thanks

          Show
          Ankit Agarwal added a comment - Problem was, the panel div is created only when somone mouse overs the div. In the patch I have made changes so that the "aria-controls" attribute is added only after the div is created. I will backport this after review. Thanks
          Hide
          Dan Poltawski added a comment -

          Thanks ankit - Have you tried the chrome audit tool btw?

          Show
          Dan Poltawski added a comment - Thanks ankit - Have you tried the chrome audit tool btw?
          Hide
          Ankit Agarwal added a comment -

          Yup, the test "ARIA state and property values must be valid" passes both before and after the tooltip panel is generated.

          Show
          Ankit Agarwal added a comment - Yup, the test "ARIA state and property values must be valid" passes both before and after the tooltip panel is generated.
          Hide
          Mark Nelson added a comment -

          Hey Ankit, makes sense. Thanks! Submitting for integration.

          Show
          Mark Nelson added a comment - Hey Ankit, makes sense. Thanks! Submitting for integration.
          Hide
          Dan Poltawski added a comment -

          Thanks for the quick fix Ankit - does this need back porting?

          Show
          Dan Poltawski added a comment - Thanks for the quick fix Ankit - does this need back porting?
          Hide
          Ankit Agarwal added a comment -

          Yup, that is what I said in my first comment.
          Branches added.

          Cheers

          Show
          Ankit Agarwal added a comment - Yup, that is what I said in my first comment. Branches added. Cheers
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Marina Glancy added a comment -

          Thanks Ankit, integrated in 2.4, 2.5 and 2.6

          Show
          Marina Glancy added a comment - Thanks Ankit, integrated in 2.4, 2.5 and 2.6
          Hide
          Jason Fowler added a comment -

          All good Ankit, thanks for this patch.

          Show
          Jason Fowler added a comment - All good Ankit, thanks for this patch.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          "Aequam memento rebus in arduis servare mentem"

          Many thanks for your hard work, this is now part of "Moodle, the LMS". Closing!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - "Aequam memento rebus in arduis servare mentem" Many thanks for your hard work, this is now part of "Moodle, the LMS". Closing! Ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile