Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Accessibility, Quiz
    • Labels:
      None
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      26270

      Description

      Although in visual order the quiz contents come first, in source order the question bank comes first and editing quizzes is difficult for screen reader users, for instance. With proper CSS, the real solution would be to change the source order so that the primary content, the quiz questions, come first. This can get tricky though.

      One quick fix is to add a skip link to quiz content, however, as skip links are not used in Moodle elsewhere, either, the implementation details of skip links should be resolved Moodle-wide first: MDL-7738

      http://www.webaim.org/techniques/skipnav/

        Issue Links

          Activity

          Hide
          Tim Hunt added a comment -

          Actually, there are skip links elsewhere in moodle. e.g. skipping to main content, and skipping over blocks on the course page.

          Show
          Tim Hunt added a comment - Actually, there are skip links elsewhere in moodle. e.g. skipping to main content, and skipping over blocks on the course page.
          Hide
          Olli Savolainen added a comment -

          Thanks. I guess I did not look hard enough.

          This in print_header() (weblib.php) hardly makes it easy to add skip links on other pages than course views, though (hardcoded page ID's):

          // Skip to main content, see skip_main_destination().
          if ($pageid=='course-view' or $pageid=='site-index' or $pageid=='course-index') {
          $skiplink = '<a class="skip" href="#maincontent">'.get_string('tocontent', 'access').'</a>';
          if (! preg_match('/(.<div[^>]+id="page"[^>]>)(.*)/s', $output, $matches))

          { preg_match('/(.*<body.*?>)(.*)/s', $output, $matches); }

          $output = $matches[1]."\n". $skiplink .$matches[2];
          }

          Also, the structure of the css makes it impossible to create a list of several skip links, since in the CSS the skiplink class is defined only for the html element "a". The following would be the semantic way of doing it in quiz editing, but now I cannot even add the bare minimum of comma between the links.

          echo '<ul class="skip"><li><a href="#quizcontentsblock" class="skip">Question bank</a></li><li><a href="#quizcontentsblock" class="skip">Quiz contents</a></li></ul>';

          I am committing a semi-useless version of the skiplinks now, which still need to be moved higher in document order.

          Show
          Olli Savolainen added a comment - Thanks. I guess I did not look hard enough. This in print_header() (weblib.php) hardly makes it easy to add skip links on other pages than course views, though (hardcoded page ID's): // Skip to main content, see skip_main_destination(). if ($pageid=='course-view' or $pageid=='site-index' or $pageid=='course-index') { $skiplink = '<a class="skip" href="#maincontent">'.get_string('tocontent', 'access').'</a>'; if (! preg_match('/(. <div [^>] +id="page" [^>] >)(.*)/s', $output, $matches)) { preg_match('/(.*<body.*?>)(.*)/s', $output, $matches); } $output = $matches [1] ."\n". $skiplink .$matches [2] ; } Also, the structure of the css makes it impossible to create a list of several skip links, since in the CSS the skiplink class is defined only for the html element "a". The following would be the semantic way of doing it in quiz editing, but now I cannot even add the bare minimum of comma between the links. echo '<ul class="skip"><li><a href="#quizcontentsblock" class="skip">Question bank</a></li><li><a href="#quizcontentsblock" class="skip">Quiz contents</a></li></ul>'; I am committing a semi-useless version of the skiplinks now, which still need to be moved higher in document order.
          Hide
          Tim Hunt added a comment -

          That is a start. Thanks. If you can be bothered, it might be worth posting your suggestion for a better way to the Accessibility forum, to see what people think. It seems like a good idea to me, but I am not an expert.

          Show
          Tim Hunt added a comment - That is a start. Thanks. If you can be bothered, it might be worth posting your suggestion for a better way to the Accessibility forum, to see what people think. It seems like a good idea to me, but I am not an expert.
          Hide
          Tim Hunt added a comment -

          I'll try to improve the mechanism for skip links as part of http://docs.moodle.org/en/Development:Navigation_2.0.

          Show
          Tim Hunt added a comment - I'll try to improve the mechanism for skip links as part of http://docs.moodle.org/en/Development:Navigation_2.0 .
          Hide
          Tim Hunt added a comment -

          Fixed using $PAGE->requires->skip_link_to()

          Show
          Tim Hunt added a comment - Fixed using $PAGE->requires->skip_link_to()

            People

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

              Dates

              • Created:
                Updated:
                Resolved: