Commit 35700373 by Matthew Harrington Committed by Jillian Vogel

Heading restructure (#144)

Amended headings to ensure accessibility.

* Amended templates - h2 elements to h3, h3 to h4 and associated CSS.
* Bumped version to 2.6.8
parent 239a6f18
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
margin-top: 10px; margin-top: 10px;
} }
.xblock .mentoring h3 { .xblock .mentoring h4 {
margin-top: 0px; margin-top: 0px;
margin-bottom: 7px; margin-bottom: 7px;
} }
......
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
font-size: 16px; font-size: 16px;
} }
.mentoring .title h2 { .mentoring .title h3 {
/* Same as h2.main in Apros */ /* Same as h2.main in Apros, amended to h3 */
color: #66a5b5; color: #66a5b5;
} }
.mentoring h3 { .mentoring h4 {
text-transform: uppercase; text-transform: uppercase;
} }
......
{% load i18n %} {% load i18n %}
<div class="xblock-answer" data-completed="{{ self.completed }}"> <div class="xblock-answer" data-completed="{{ self.completed }}">
{% if not hide_header %}<h3 class="question-title">{{ self.display_name_with_default }}</h3>{% endif %} {% if not hide_header %}<h4 class="question-title">{{ self.display_name_with_default }}</h4>{% endif %}
<label><p>{{ self.question|safe }}</p> <label><p>{{ self.question|safe }}</p>
<textarea <textarea
class="answer editable" cols="50" rows="10" name="input" class="answer editable" cols="50" rows="10" name="input"
......
{% load i18n %} {% load i18n %}
<div class="xblock-answer"> <div class="xblock-answer">
{% if not hide_header %}<h3 class="question-title">{{ title }}</h3>{% endif %} {% if not hide_header %}<h4 class="question-title">{{ title }}</h4>{% endif %}
{% if description %}<p>{{ description|safe }}</p>{% endif %} {% if description %}<p>{{ description|safe }}</p>{% endif %}
<blockquote class="answer read_only"> <blockquote class="answer read_only">
{% if student_input %} {% if student_input %}
......
{% load i18n %} {% load i18n %}
<div class="xblock-pb-completion"> <div class="xblock-pb-completion">
{% if not hide_header %}<h3 class="question-title">{{ title }}</h3>{% endif %} {% if not hide_header %}<h4 class="question-title">{{ title }}</h4>{% endif %}
<div class="clearfix"> <div class="clearfix">
<p>{{ question|safe }}</p> <p>{{ question|safe }}</p>
<p> <p>
......
{% load i18n %} {% load i18n %}
<div class="pb-dashboard"> <div class="pb-dashboard">
<div class="dashboard-report"> <div class="dashboard-report">
<h2>{{display_name}}</h2> <h3>{{display_name}}</h3>
{% if header_html %} {% if header_html %}
<div class="report-header"> <div class="report-header">
......
{% load i18n %} {% load i18n %}
<h2>{% trans "Instructor Tool" %}</h3> <h4>{% trans "Instructor Tool" %}</h4>
<div class="data-export-options"> <div class="data-export-options">
<div class="data-export-header"> <div class="data-export-header">
<h3>{% trans "Filters" %}</h3> <h4>{% trans "Filters" %}</h4>
</div> </div>
<div class="data-export-row"> <div class="data-export-row">
<div class="data-export-field-container"> <div class="data-export-field-container">
......
{% load i18n %} {% load i18n %}
{% if not hide_header %} {% if not hide_header %}
<h3 class="question-title" id="heading_{{ self.html_id }}">{{ self.display_name_with_default }}</h3> <h4 class="question-title" id="heading_{{ self.html_id }}">{{ self.display_name_with_default }}</h4>
{% endif %} {% endif %}
<fieldset class="choices questionnaire" id="{{ self.html_id }}"> <fieldset class="choices questionnaire" id="{{ self.html_id }}">
<legend class="question field-group-hd">{{ self.question|safe }}</legend> <legend class="question field-group-hd">{{ self.question|safe }}</legend>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
{% if show_title and title %} {% if show_title and title %}
<div class="title"> <div class="title">
<h2>{{ title }}</h2> <h3>{{ title }}</h3>
</div> </div>
{% endif %} {% endif %}
......
<script type="text/template" id="xblock-grade-template"> <script type="text/template" id="xblock-grade-template">
<div class="grade-result"> <div class="grade-result">
<h2> <h4>
<%= _.template(gettext("You scored {percent}% on this assessment."), {percent: score}, {interpolate: /\{(.+?)\}/g}) %> <%= _.template(gettext("You scored {percent}% on this assessment."), {percent: score}, {interpolate: /\{(.+?)\}/g}) %>
</h2> </h4>
<hr/> <hr/>
<span class="assessment-checkmark icon-2x checkmark-correct icon-ok fa fa-check"></span> <span class="assessment-checkmark icon-2x checkmark-correct icon-ok fa fa-check"></span>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% if show_title and title %} {% if show_title and title %}
<div class="title"> <div class="title">
<h2>{{ title }}</h2> <h3>{{ title }}</h3>
</div> </div>
{% endif %} {% endif %}
......
{% load i18n %} {% load i18n %}
{% if not hide_header %} {% if not hide_header %}
<h3 class="question-title" id="heading_{{ self.html_id }}">{{ self.display_name_with_default }}</h3> <h4 class="question-title" id="heading_{{ self.html_id }}">{{ self.display_name_with_default }}</h4>
{% endif %} {% endif %}
<fieldset class="choices questionnaire" id="{{ self.html_id }}" <fieldset class="choices questionnaire" id="{{ self.html_id }}"
data-hide_results="{{ self.hide_results }}" data-hide_prev_answer="{{ hide_prev_answer }}"> data-hide_results="{{ self.hide_results }}" data-hide_prev_answer="{{ hide_prev_answer }}">
......
{% load i18n %} {% load i18n %}
<div class="sb-plot-overlay"> <div class="sb-plot-overlay">
{% if self.plot_label and self.point_color %} {% if self.plot_label and self.point_color %}
<h3 style="color: {{ self.point_color }};">{{ self.plot_label }} {% trans "Overlay" %}</h3> <h4 style="color: {{ self.point_color }};">{{ self.plot_label }} {% trans "Overlay" %}</h4>
{% endif %} {% endif %}
<p> <p>
<strong>{% trans "Description:" %}</strong> <strong>{% trans "Description:" %}</strong>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<div class="overlays"> <div class="overlays">
<h3>{% trans "Compare your plot to others!" %}</h3> <h4>{% trans "Compare your plot to others!" %}</h4>
<input type="button" <input type="button"
class="plot-default" class="plot-default"
......
{% load i18n %} {% load i18n %}
{% if not hide_header %} {% if not hide_header %}
<h3 class="question-title" id="heading_{{ self.html_id }}">{{ self.display_name_with_default }}</h3> <h4 class="question-title" id="heading_{{ self.html_id }}">{{ self.display_name_with_default }}</h4>
{% endif %} {% endif %}
<fieldset class="rating questionnaire" id="{{ self.html_id }}"> <fieldset class="rating questionnaire" id="{{ self.html_id }}">
<legend class="question field-group-hd">{{ self.question|safe }}</legend> <legend class="question field-group-hd">{{ self.question|safe }}</legend>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="sb-review-score"> <div class="sb-review-score">
<div class="grade-result"> <div class="grade-result">
<h2>{% blocktrans %}You scored {{score}}% on this assessment. {% endblocktrans %}</h2> <h4>{% blocktrans %}You scored {{score}}% on this assessment. {% endblocktrans %}</h4>
{% if show_extended_review %} {% if show_extended_review %}
<p class="review-links-explanation"> <p class="review-links-explanation">
{% trans "Click a question to review feedback on your response." %} {% trans "Click a question to review feedback on your response." %}
......
{% load i18n %} {% load i18n %}
<div class="xblock-pb-slider"> <div class="xblock-pb-slider">
{% if not hide_header %}<h3 class="question-title">{{ title }}</h3>{% endif %} {% if not hide_header %}<h4 class="question-title">{{ title }}</h4>{% endif %}
<div class="pb-slider-box clearfix"> <div class="pb-slider-box clearfix">
<p><label>{{ question|safe }} <span class="sr">({{instructions_string}})</span> <p><label>{{ question|safe }} <span class="sr">({{instructions_string}})</span>
<input type="range" id="{{ slider_id }}" class="pb-slider-range" <input type="range" id="{{ slider_id }}" class="pb-slider-range"
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
data-next-button-label="{{ self.next_button_label }}" {% if self.has_question %} data-has-question="true" {% endif %}> data-next-button-label="{{ self.next_button_label }}" {% if self.has_question %} data-has-question="true" {% endif %}>
{% if show_title %} {% if show_title %}
<div class="title"> <div class="title">
<h3> <h4>
{% if title %} {% if title %}
{{ title }} {{ title }}
{% else %} {% else %}
{{ self.display_name_with_default }} {{ self.display_name_with_default }}
{% endif %} {% endif %}
</h3> </h4>
</div> </div>
{% endif %} {% endif %}
......
...@@ -281,7 +281,7 @@ class MentoringAssessmentBaseTest(ProblemBuilderBaseTest): ...@@ -281,7 +281,7 @@ class MentoringAssessmentBaseTest(ProblemBuilderBaseTest):
self.wait_until_text_in(question_text, mentoring) self.wait_until_text_in(question_text, mentoring)
question_div = None question_div = None
for xblock_div in mentoring.find_elements_by_css_selector('div.xblock-v1'): for xblock_div in mentoring.find_elements_by_css_selector('div.xblock-v1'):
header_text = xblock_div.find_elements_by_css_selector('h3.question-title') header_text = xblock_div.find_elements_by_css_selector('h4.question-title')
if header_text and question_text in header_text[0].text: if header_text and question_text in header_text[0].text:
question_div = xblock_div question_div = xblock_div
self.assertTrue(xblock_div.is_displayed()) self.assertTrue(xblock_div.is_displayed())
......
...@@ -48,12 +48,12 @@ class TitleTest(SeleniumXBlockTest): ...@@ -48,12 +48,12 @@ class TitleTest(SeleniumXBlockTest):
self.set_scenario_xml(xml) self.set_scenario_xml(xml)
pb_element = self.go_to_view() pb_element = self.go_to_view()
if expected_title is not None: if expected_title is not None:
h2 = pb_element.find_element_by_css_selector('h2') h3 = pb_element.find_element_by_css_selector('h3')
self.assertEqual(h2.text, expected_title) self.assertEqual(h3.text, expected_title)
else: else:
# No <h2> element should be present: # No <h3> element should be present:
all_h2s = pb_element.find_elements_by_css_selector('h2') all_h3s = pb_element.find_elements_by_css_selector('h3')
self.assertEqual(len(all_h2s), 0) self.assertEqual(len(all_h3s), 0)
class StepTitlesTest(SeleniumXBlockTest): class StepTitlesTest(SeleniumXBlockTest):
...@@ -145,9 +145,9 @@ class StepTitlesTest(SeleniumXBlockTest): ...@@ -145,9 +145,9 @@ class StepTitlesTest(SeleniumXBlockTest):
self.set_scenario_xml(xml) self.set_scenario_xml(xml)
pb_element = self.go_to_view() pb_element = self.go_to_view()
if expected_title: if expected_title:
h3 = pb_element.find_element_by_css_selector('h3') h4 = pb_element.find_element_by_css_selector('h4')
self.assertEqual(h3.text, expected_title) self.assertEqual(h4.text, expected_title)
else: else:
# No <h3> element should be present: # No <h4> element should be present:
all_h3s = pb_element.find_elements_by_css_selector('h3') all_h4s = pb_element.find_elements_by_css_selector('h4')
self.assertEqual(len(all_h3s), 0) self.assertEqual(len(all_h4s), 0)
<problem-builder enforce_dependency="false" followed_by="past_attempts" show_title="false"> <problem-builder enforce_dependency="false" followed_by="past_attempts" show_title="false">
<html> <html>
<h3>Checking your improvement frog</h3> <h4>Checking your improvement frog</h4>
<p>Now, let's make sure your frog meets the criteria for a strong column 1. Here is your frog:</p> <p>Now, let's make sure your frog meets the criteria for a strong column 1. Here is your frog:</p>
</html> </html>
<pb-answer-recap name="improvement-frog"/> <pb-answer-recap name="improvement-frog"/>
......
...@@ -7,7 +7,7 @@ This contains a typical problem taken from a live course (content changed) ...@@ -7,7 +7,7 @@ This contains a typical problem taken from a live course (content changed)
<![CDATA[ <![CDATA[
<mentoring enforce_dependency="false" followed_by="past_attempts"> <mentoring enforce_dependency="false" followed_by="past_attempts">
<html> <html>
<h3>Checking your improvement frog</h3> <h4>Checking your improvement frog</h4>
<p>Now, let's make sure your frog meets the criteria for a strong column 1. Here is your frog:</p> <p>Now, let's make sure your frog meets the criteria for a strong column 1. Here is your frog:</p>
</html> </html>
<answer name="improvement-frog" read_only="true"/> <answer name="improvement-frog" read_only="true"/>
......
...@@ -71,7 +71,7 @@ BLOCKS = [ ...@@ -71,7 +71,7 @@ BLOCKS = [
setup( setup(
name='xblock-problem-builder', name='xblock-problem-builder',
version='2.6.7', version='2.6.8',
description='XBlock - Problem Builder', description='XBlock - Problem Builder',
packages=['problem_builder', 'problem_builder.v1'], packages=['problem_builder', 'problem_builder.v1'],
install_requires=[ install_requires=[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment