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

Inaccessible (not describable) question headings: definition of the problem + solution

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.3.4
    • Accessibility
    • None
    • MOODLE_23_STABLE

      NB: All of the tracker issues, posted by 'accessible_for_vip', are based on the theme 'Accessible for VIP' (https://moodle.org/plugins/view.php?plugin=theme_accessible_for_vip) which is developed for people who are blind or have a low vision. All of the (code)solutions are based on the files which belong to this specific theme and are only usable with this theme at this moment (but it is also possible to include the solution in general source code).

      When you completed a quiz, you can read the checked questions/answers, but they have not a clear heading. Every question has the heading ‘Question text’ and every answer the heading ‘Feedback’. For an user of a screenreader this is very intricate, so we create more describable headings. For example: “Question 3 text” and “Feedback question 3”, this is also more clearly in the heading list of the screenreader. We have done this by adding two language Strings:

      theme/accessible_for_vip/lang/en/theme_accessible_for_vip.php:

      $string['question-x-text'] = 'Question {$a->number} text';
      $string['feedback-question-x'] = 'Feedback question {$a->number}';
      

      And to make sure that the language String can be used, we adapted the renderer (theme/accessible_for_vip/renderers.php):

      class theme_accessible_for_vip_core_question_renderer extends core_question_renderer {
      	public function question(question_attempt $qa, qbehaviour_renderer $behaviouroutput,
      		qtype_renderer $qtoutput, question_display_options $options, $number) {
      		......
      		
      		$output .= html_writer::tag('div',
      			$this->add_part_heading(get_string('question-x-text', 'theme_accessible_for_vip', $number),
      				$this->formulation($qa, $behaviouroutput, $qtoutput, $options)),
      			array('class' => 'formulation'));
      		$output .= html_writer::nonempty_tag('div',
      			$this->add_part_heading(get_string('feedback-question-x', 'theme_accessible_for_vip', $number), 
      				$this->outcome($qa, $behaviouroutput, $qtoutput, $options)),
      			array('class' => 'outcome'));
      		
      		.......
      	}
      }
      

            Unassigned Unassigned
            accessible_for_vip Larissa Klaassen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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