MDL-29571 questions: improve class=accesshide screen-reader hints.

This changes the hint that comes before the question text. There are
unit tests to verify the new behaviour.

(amended to fix comments)
This commit is contained in:
Tim Hunt
2011-10-04 11:53:07 +02:00
committed by Eloy Lafuente (stronk7)
parent 5e69fe4971
commit 74969d8866
6 changed files with 74 additions and 5 deletions
+10
View File
@@ -49,6 +49,16 @@ abstract class qtype_renderer extends plugin_renderer_base {
return $qa->get_question()->format_questiontext($qa);
}
/**
* In the question output there are some class="accesshide" headers to help
* screen-readers. This method returns the text to use for the heading above
* the formulation_and_controls section.
* @return string to use as the heading.
*/
public function formulation_heading() {
return get_string('questiontext', 'question');
}
/**
* Output hidden form fields to clear any wrong parts of the student's response.
*