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

Create AMD modal module

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2
    • Component/s: JavaScript
    • Testing Instructions:
      Hide

      I've included a testing commit on top of the changes to create a page that launches a few different types of modals. If you cherry-pick that commit then you should be able to go to <your_moodle_instance>/testmodal.php to do the testing.

      Using the testing page you should be able to test that the modals behave correctly (they should behave similarly to the YUI modal dialogues). Including:

      • Locking focus inside the modal when it's open
      • Locking scrolling of the background content when the modal is open but an open modal that exceeds the height of the page should be scrollable
      • Focus should be returned to the element that opened the modal when the modal is closed
      • Escape key should close the modal
      • You should be able to launch a modal from within another modal
      • The focus should be set on the modal's title when it's first opened
      • Modals should be screen reader accessible (using JAWS on IE)

      I did notice one issue on Chrome with Chromevox which is that Chromevox wasn't allowing the focus to be set on the title of the modal when the modal is launch by hitting enter on an anchor tag. The bug only occurs from the second time a modal is launch using enter after the page load, the first time seems to work fine.

      Show
      I've included a testing commit on top of the changes to create a page that launches a few different types of modals. If you cherry-pick that commit then you should be able to go to <your_moodle_instance>/testmodal.php to do the testing. Using the testing page you should be able to test that the modals behave correctly (they should behave similarly to the YUI modal dialogues). Including: Locking focus inside the modal when it's open Locking scrolling of the background content when the modal is open but an open modal that exceeds the height of the page should be scrollable Focus should be returned to the element that opened the modal when the modal is closed Escape key should close the modal You should be able to launch a modal from within another modal The focus should be set on the modal's title when it's first opened Modals should be screen reader accessible (using JAWS on IE) I did notice one issue on Chrome with Chromevox which is that Chromevox wasn't allowing the focus to be set on the title of the modal when the modal is launch by hitting enter on an anchor tag. The bug only occurs from the second time a modal is launch using enter after the page load, the first time seems to work fine.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-55727-master

      Description

      We need a way to create modals in AMD. The best we've got currently is a wrapper around the YUI dialogues but that isn't in core.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/Dec/16