Fix a11y issues.
TNL-6440, TNL-6439
This commit is contained in:
@@ -581,13 +581,6 @@ class CourseWikiTest(UniqueCourseTest):
|
||||
self.course_wiki_page.open_editor()
|
||||
self.course_wiki_edit_page.wait_for_page()
|
||||
|
||||
def _check_for_accessibility_errors(self, page, custom_rules=None):
|
||||
""" Run accessibility check with custom rules, if provided """
|
||||
if custom_rules is not None:
|
||||
page.a11y_audit.config.set_rules(custom_rules)
|
||||
|
||||
page.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
@attr(shard=1)
|
||||
def test_edit_course_wiki(self):
|
||||
"""
|
||||
@@ -610,7 +603,7 @@ class CourseWikiTest(UniqueCourseTest):
|
||||
"""
|
||||
Verify the basic accessibility of the wiki page as initially displayed.
|
||||
"""
|
||||
self._check_for_accessibility_errors(self.course_wiki_page)
|
||||
self.course_wiki_page.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
@attr('a11y')
|
||||
def test_edit_a11y(self):
|
||||
@@ -618,7 +611,7 @@ class CourseWikiTest(UniqueCourseTest):
|
||||
Verify the basic accessibility of edit wiki page.
|
||||
"""
|
||||
self._open_editor()
|
||||
self._check_for_accessibility_errors(self.course_wiki_edit_page)
|
||||
self.course_wiki_edit_page.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
@attr('a11y')
|
||||
def test_changes_a11y(self):
|
||||
@@ -628,7 +621,7 @@ class CourseWikiTest(UniqueCourseTest):
|
||||
self.course_wiki_page.show_history()
|
||||
history_page = CourseWikiHistoryPage(self.browser, self.course_id, self.course_info)
|
||||
history_page.wait_for_page()
|
||||
self._check_for_accessibility_errors(history_page)
|
||||
history_page.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
@attr('a11y')
|
||||
def test_children_a11y(self):
|
||||
@@ -638,13 +631,7 @@ class CourseWikiTest(UniqueCourseTest):
|
||||
self.course_wiki_page.show_children()
|
||||
children_page = CourseWikiChildrenPage(self.browser, self.course_id, self.course_info)
|
||||
children_page.wait_for_page()
|
||||
custom_rules = {
|
||||
'ignore': [
|
||||
'label', # TNL-6440
|
||||
'data-table' # TNL-6439
|
||||
]
|
||||
}
|
||||
self._check_for_accessibility_errors(children_page, custom_rules)
|
||||
children_page.a11y_audit.check_for_accessibility_errors()
|
||||
|
||||
|
||||
@attr(shard=1)
|
||||
|
||||
Reference in New Issue
Block a user