Commit b64c6802 by Christine Lytwynec

Merge pull request #727 from edx/clytwynec/update-a11y-tests

update a11y tests to use axe-core ruleset
parents 0057feae 4f21b9fa
bok-choy==0.4.3 bok-choy==0.4.5
nose==1.3.3 nose==1.3.3
...@@ -14,26 +14,15 @@ class OpenAssessmentAxsTest(OpenAssessmentTest): ...@@ -14,26 +14,15 @@ class OpenAssessmentAxsTest(OpenAssessmentTest):
def _check_axs(self): def _check_axs(self):
self.auto_auth_page.visit() self.auto_auth_page.visit()
self.submission_page.visit() self.submission_page.visit()
report = self.submission_page.do_axs_audit() self.submission_page.a11y_audit.config.set_rules({
"ignore": [
# There was one page in this session "aria-valid-attr", # TODO: AC-199
self.assertEqual(1, len(report)) "color-contrast", # TODO: AC-198
"empty-heading", # TODO: AC-197
result = report[0] "link-name", # TODO: AC-196
# Verify that this page has no accessibility errors. ]
self.assertEqual(0, len(result.errors)) })
report = self.submission_page.a11y_audit.check_for_accessibility_errors()
# Verify that this page currently has 2 accessibility warnings.
self.assertEqual(2, len(result.warnings))
# And that these are the warnings that the page currently gives.
for warning in result.warnings:
self.assertTrue(
warning.startswith((
'Warning: AX_FOCUS_01',
'Warning: AX_COLOR_01',
)),
msg="Unexpected warning: {}".format(warning))
class SelfAssessmentAxsTest(OpenAssessmentAxsTest): class SelfAssessmentAxsTest(OpenAssessmentAxsTest):
......
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