-
+ |
{% if question.img %}
![{{question.img_alt|default_if_none:''}}]({{question.img}})
@@ -25,7 +25,7 @@
{{question.label|safe}}
|
{% for answer, label in answers %}
-
+ |
{% with answer_count=forloop.counter %}
{% for answer, label in answers %}
{% if forloop.counter == answer_count %}
@@ -37,7 +37,7 @@
{% if question.img_alt %}
aria-label="{{question.img_alt}} {{label}}"
{% else %}
- aria-label="{{question.label|striptags}} {{label}}"
+ aria-label="{{label|safe}}"
{% endif %}
/>
{{label}}
diff --git a/setup.py b/setup.py
index 0f498bf..60351a9 100644
--- a/setup.py
+++ b/setup.py
@@ -46,7 +46,7 @@ def package_data(pkg, roots):
setup(
name='xblock-poll',
- version='1.9.2',
+ version='1.9.3',
description='An XBlock for polling users.',
packages=[
'poll',
diff --git a/tests/integration/test_functions.py b/tests/integration/test_functions.py
index 452de4d..5325660 100644
--- a/tests/integration/test_functions.py
+++ b/tests/integration/test_functions.py
@@ -186,7 +186,7 @@ def test_survey_options_a11y(self):
self.assertEqual(len(options), len(answers))
for j, option in enumerate(options):
self.assertIn(answer_text[j], option.get_attribute('aria-label'))
- self.assertIn(question_text[i], option.get_attribute('aria-label'))
+ self.assertIn(option.get_attribute('aria-label'), answer_text)
def fill_survey(self, assert_submit=False):
"""
|