Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-ora2
Commits
b64c6802
Commit
b64c6802
authored
Sep 30, 2015
by
Christine Lytwynec
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #727 from edx/clytwynec/update-a11y-tests
update a11y tests to use axe-core ruleset
parents
0057feae
4f21b9fa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
21 deletions
+10
-21
requirements/test-acceptance.txt
+1
-1
test/acceptance/accessibility.py
+9
-20
No files found.
requirements/test-acceptance.txt
View file @
b64c6802
bok-choy==0.4.
3
bok-choy==0.4.
5
nose==1.3.3
nose==1.3.3
test/acceptance/accessibility.py
View file @
b64c6802
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment