diff --git a/question/type/numerical/renderer.php b/question/type/numerical/renderer.php index 31c08384653..98f48921c00 100644 --- a/question/type/numerical/renderer.php +++ b/question/type/numerical/renderer.php @@ -114,8 +114,8 @@ class qtype_numerical_renderer extends qtype_renderer { } if ($placeholder) { - $inputinplace = html_writer::tag('label', get_string('answer'), - array('for' => $inputattributes['id'], 'class' => 'accesshide')); + $inputinplace = html_writer::tag('label', $options->add_question_identifier_to_label(get_string('answer')), + array('for' => $inputattributes['id'], 'class' => 'sr-only')); $inputinplace .= $input; $questiontext = substr_replace($questiontext, $inputinplace, strpos($questiontext, $placeholder), strlen($placeholder)); @@ -125,7 +125,9 @@ class qtype_numerical_renderer extends qtype_renderer { if (!$placeholder) { $result .= html_writer::start_tag('div', array('class' => 'ablock form-inline')); - $result .= html_writer::tag('label', get_string('answercolon', 'qtype_numerical'), array('for' => $inputattributes['id'])); + $label = $options->add_question_identifier_to_label(get_string('answercolon', 'qtype_numerical'), true); + $result .= html_writer::tag('label', $label, + array('for' => $inputattributes['id'])); $result .= html_writer::tag('span', $input, array('class' => 'answer')); $result .= html_writer::end_tag('div'); }