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

Capture focus in Grader

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      In a site with a course, and users enrolled in it:

      1. Login as teacher
      2. Create a forum with whole-forum grading enabled
      3. Login as a student, and post a discussion in the forum
      4. Log back in as teacher
      5. Navigate to the forum
      6. Press Grade users
      7. Use the tab, shift + tab keys, and any other means you can do attempt to focus outside of the grader
        1. Confirm that you are thwarted
      8. Close the Grader
        1. Confirm that your focus was returned to the "Grade users" button
      9. Re-open the grader without refreshing the page
        1. confirm that the focus lock still works no matter how many times you open/close the grader
      10. With the grader open, navigate to the grading of the student who posted in step 3. Click the "View discussion" link
        1. Confirm that the focus lock is constrained to the discussion modal
      1. Press escape/Cancel/X (all should work)
        1. Confirm that focus has been set to the "View discussion" link which you clicked to open the discussion
      2. Use the tab, shift + tab keys, and any other means you can do attempt to focus outside of the grader
        1. Confirm that you are still thwarted
      3. Log in as a student
      4. View the forum
      5. Click the "View grade" button
      6. Use the tab, shift + tab keys, and any other means you can do attempt to focus outside of the grader
        1. Confirm that you are thwarted
        2. Confirm that the page does not move up/down as you tab and shift tab round in circles
      Show
      In a site with a course, and users enrolled in it: Login as teacher Create a forum with whole-forum grading enabled Login as a student, and post a discussion in the forum Log back in as teacher Navigate to the forum Press Grade users Use the tab, shift + tab keys, and any other means you can do attempt to focus outside of the grader Confirm that you are thwarted Close the Grader Confirm that your focus was returned to the "Grade users" button Re-open the grader without refreshing the page confirm that the focus lock still works no matter how many times you open/close the grader With the grader open, navigate to the grading of the student who posted in step 3. Click the "View discussion" link Confirm that the focus lock is constrained to the discussion modal Press escape/Cancel/X (all should work) Confirm that focus has been set to the "View discussion" link which you clicked to open the discussion Use the tab, shift + tab keys, and any other means you can do attempt to focus outside of the grader Confirm that you are still thwarted Log in as a student View the forum Click the "View grade" button Use the tab, shift + tab keys, and any other means you can do attempt to focus outside of the grader Confirm that you are thwarted Confirm that the page does not move up/down as you tab and shift tab round in circles
    • Affected Branches:
      MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE
    • Pull Master Branch:
      MDL-67207-master
    • Sprint:
      Internationals - 3.8 Alpha

      Description

      The Grader interface is essentially a full-page modal and therefore it should lock focus as per the WAI ARIA guidelines:

      https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/dialog.html

      This issue adds a new implementation, which is not specific to any other module and works on any arbitrary Node, to lock focus.
      It supports stacking (modals in modals in modals), and unstacking. It also correctly handles looping of focus within the region.

      It follows the guidelines in the guidelines.

      I've also taken the liberty of addressing the focus on close aspect of the specification which is another related and very important part of the specification.

      I have not added "Escape" handling (Escape key should close top-most modal). That's a whole other thing to solve.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dobedobedoh Andrew Nicols
              Peer reviewer:
              Michael Hawkins
              Integrator:
              Jake Dallimore
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 4 hours, 37 minutes
                  1d 4h 37m