Commit db049112 by Chris Committed by GitHub

Merge pull request #12924 from edx/clrux/ac-521

AC-521 fixes 'data-table' ignores
parents 6d7a5452 ddc93abf
...@@ -60,8 +60,8 @@ class LMSInstructorDashboardA11yTest(BaseInstructorDashboardTest): ...@@ -60,8 +60,8 @@ class LMSInstructorDashboardA11yTest(BaseInstructorDashboardTest):
def test_instructor_dashboard_a11y(self): def test_instructor_dashboard_a11y(self):
self.instructor_dashboard_page.a11y_audit.config.set_rules({ self.instructor_dashboard_page.a11y_audit.config.set_rules({
"ignore": [ "ignore": [
'checkboxgroup', # TODO: AC-552
'link-href', # TODO: AC-491 'link-href', # TODO: AC-491
'data-table', # TODO: AC-491
] ]
}) })
self.instructor_dashboard_page.a11y_audit.check_for_accessibility_errors() self.instructor_dashboard_page.a11y_audit.check_for_accessibility_errors()
...@@ -1270,7 +1270,6 @@ class CertificateInvalidationTest(BaseInstructorDashboardTest): ...@@ -1270,7 +1270,6 @@ class CertificateInvalidationTest(BaseInstructorDashboardTest):
]) ])
self.certificates_section.a11y_audit.config.set_rules({ self.certificates_section.a11y_audit.config.set_rules({
"ignore": [ "ignore": [
'data-table', # TODO: AC-491
'aria-valid-attr-value', # TODO: AC-491 'aria-valid-attr-value', # TODO: AC-491
'checkboxgroup', # TODO: AC-491 'checkboxgroup', # TODO: AC-491
'color-contrast', # TODO: AC-491 'color-contrast', # TODO: AC-491
......
...@@ -149,10 +149,10 @@ class TestInstructorDashboard(ModuleStoreTestCase, LoginEnrollmentTestCase, XssT ...@@ -149,10 +149,10 @@ class TestInstructorDashboard(ModuleStoreTestCase, LoginEnrollmentTestCase, XssT
# enrollment information visible # enrollment information visible
self.assertIn('<h3 class="hd hd-3">Enrollment Information</h3>', response.content) self.assertIn('<h3 class="hd hd-3">Enrollment Information</h3>', response.content)
self.assertTrue('<td>Verified</td>' in response.content) self.assertIn('<th scope="row">Verified</th>', response.content)
self.assertTrue('<td>Audit</td>' in response.content) self.assertIn('<th scope="row">Audit</th>', response.content)
self.assertTrue('<td>Honor</td>' in response.content) self.assertIn('<th scope="row">Honor</th>', response.content)
self.assertTrue('<td>Professional</td>' in response.content) self.assertIn('<th scope="row">Professional</th>', response.content)
# dashboard link hidden # dashboard link hidden
self.assertFalse(self.get_dashboard_enrollment_message() in response.content) self.assertFalse(self.get_dashboard_enrollment_message() in response.content)
...@@ -166,11 +166,10 @@ class TestInstructorDashboard(ModuleStoreTestCase, LoginEnrollmentTestCase, XssT ...@@ -166,11 +166,10 @@ class TestInstructorDashboard(ModuleStoreTestCase, LoginEnrollmentTestCase, XssT
users = [UserFactory() for _ in range(2)] users = [UserFactory() for _ in range(2)]
CourseEnrollment.enroll(users[0], self.course.id, mode="professional") CourseEnrollment.enroll(users[0], self.course.id, mode="professional")
CourseEnrollment.enroll(users[1], self.course.id, mode="no-id-professional") CourseEnrollment.enroll(users[1], self.course.id, mode="no-id-professional")
response = self.client.get(self.url) response = self.client.get(self.url)
# Check that the number of professional enrollments is two # Check that the number of professional enrollments is two
self.assertContains(response, "<td>Professional</td><td>2</td>") self.assertContains(response, '<th scope="row">Professional</th><td>2</td>')
@patch.dict(settings.FEATURES, {'DISPLAY_ANALYTICS_ENROLLMENTS': False}) @patch.dict(settings.FEATURES, {'DISPLAY_ANALYTICS_ENROLLMENTS': False})
@override_settings(ANALYTICS_DASHBOARD_URL='http://example.com') @override_settings(ANALYTICS_DASHBOARD_URL='http://example.com')
...@@ -182,10 +181,10 @@ class TestInstructorDashboard(ModuleStoreTestCase, LoginEnrollmentTestCase, XssT ...@@ -182,10 +181,10 @@ class TestInstructorDashboard(ModuleStoreTestCase, LoginEnrollmentTestCase, XssT
response = self.client.get(self.url) response = self.client.get(self.url)
# enrollment information hidden # enrollment information hidden
self.assertFalse('<td>Verified</td>' in response.content) self.assertNotIn('<th scope="row">Verified</th>', response.content)
self.assertFalse('<td>Audit</td>' in response.content) self.assertNotIn('<th scope="row">Audit</th>', response.content)
self.assertFalse('<td>Honor</td>' in response.content) self.assertNotIn('<th scope="row">Honor</th>', response.content)
self.assertFalse('<td>Professional</td>' in response.content) self.assertNotIn('<th scope="row">Professional</th>', response.content)
# link to dashboard shown # link to dashboard shown
expected_message = self.get_dashboard_enrollment_message() expected_message = self.get_dashboard_enrollment_message()
......
<div class="auto_enroll auto_enroll_csv"> <div class="auto_enroll auto_enroll_csv">
<h2> ${_("Register/Enroll Students")} </h2> <h3 class="hd hd-3">Register/Enroll Students</h3>
<p> <p>
${_("To register and enroll a list of users in this course, choose a CSV file that contains the following columns in this exact order: email, username, name, and country. Please include one student per row and do not include any headers, footers, or blank lines.")} To register and enroll a list of users in this course, choose a CSV file that contains the following columns in this exact order: email, username, name, and country. Please include one student per row and do not include any headers, footers, or blank lines.
</p> </p>
<form id="student-auto-enroll-form"> <form id="student-auto-enroll-form">
...@@ -17,4 +17,4 @@ ...@@ -17,4 +17,4 @@
<button type="submit" name="enrollment_signup_button">${_("Upload CSV")}</button> <button type="submit" name="enrollment_signup_button">${_("Upload CSV")}</button>
</form> </form>
<div class="results"></div> <div class="results"></div>
</div> </div>
\ No newline at end of file
...@@ -67,7 +67,7 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -67,7 +67,7 @@ from openedx.core.djangolib.markup import HTML, Text
<div class="auth-list-container active"> <div class="auth-list-container active">
<div class="member-list-widget"> <div class="member-list-widget">
<div class="member-list"> <div class="member-list">
<h2> ${_("Student List Management")}</h2> <h2 class="hd hd-2">${_("Student List Management")}</h2>
%if messages: %if messages:
<label for="ccx_std_list_messages" class="sr">${_("CCX student list management response message")}</label> <label for="ccx_std_list_messages" class="sr">${_("CCX student list management response message")}</label>
<div id="ccx_std_list_messages" tabindex="-1" class="request-response-error"> <div id="ccx_std_list_messages" tabindex="-1" class="request-response-error">
...@@ -79,9 +79,9 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -79,9 +79,9 @@ from openedx.core.djangolib.markup import HTML, Text
<table> <table>
<thead> <thead>
<tr> <tr>
<td class="label">Username</td> <th class="label" scope="col">Username</th>
<td class="label">Email</td> <th class="label" scope="col">Email</th>
<td class="label">Revoke access</td> <th class="label" scope="col">Revoke access</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -89,7 +89,7 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -89,7 +89,7 @@ from openedx.core.djangolib.markup import HTML, Text
<tr> <tr>
<td>${member.user}</td> <td>${member.user}</td>
<td>${member.user.email}</td> <td>${member.user.email}</td>
<td><a class="revoke"><span class="fa fa-times-circle" aria-hidden="true"></span> ${_("Revoke access")}</a></td> <td><button type="button" class="revoke"><span class="fa fa-times-circle" aria-hidden="true"></span>${_("Revoke access")}</button></td>
</tr> </tr>
%endfor %endfor
</tbody> </tbody>
......
...@@ -143,9 +143,9 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str ...@@ -143,9 +143,9 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str
<table> <table>
<thead> <thead>
<tr> <tr>
<td class="task-name"></td> <th class="task-name" scope="col">${_('Task name')}</th>
<td class="task-date"></td> <th class="task-date" scope="col">${_('Date')}</th>
<td class="task-details"></td> <th class="task-details" scope="col">${_('Details')}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
......
...@@ -9,26 +9,30 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -9,26 +9,30 @@ from openedx.core.djangolib.markup import HTML, Text
<div class="enrollment-wrapper"> <div class="enrollment-wrapper">
%if settings.FEATURES.get('DISPLAY_ANALYTICS_ENROLLMENTS'): %if settings.FEATURES.get('DISPLAY_ANALYTICS_ENROLLMENTS'):
## Translators: 'track' refers to the enrollment type ('honor', 'verified', or 'audit') ## Translators: 'track' refers to the enrollment type ('honor', 'verified', or 'audit')
<span class="tip">${_("Number of enrollees (admins, staff, and students) by track")}</span>
<br/><br/>
<% modes = section_data['enrollment_count'] %> <% modes = section_data['enrollment_count'] %>
<table> <table>
<tr> <caption class="tip">${_("Number of enrollees (admins, staff, and students) by track")}</caption>
<td>${_("Verified")}</td><td>${modes['verified']}</td> <tr>
</tr> <th scope="row">${_("Verified")}</th><td>${modes['verified']}</td>
<tr> </tr>
<td>${_("Audit")}</td><td>${modes['audit']}</td> <tr>
</tr> <th scope="row">${_("Audit")}</th><td>${modes['audit']}</td>
<tr> </tr>
<td>${_("Honor")}</td><td>${modes['honor']}</td> <tr>
</tr> <th scope="row">${_("Honor")}</th><td>${modes['honor']}</td>
<tr> </tr>
<td>${_("Professional")}</td><td>${modes['professional'] + modes['no-id-professional']}</td> <tr>
</tr> <th scope="row">${_("Professional")}</th><td>${modes['professional'] + modes['no-id-professional']}</td>
<tr style="color:green;border-top:1px solid #000"> </tr>
<td style="padding-top:10px;"><b>${_("Total")}</b></td><td style="padding-top:10px;"><b>${modes['total']}</b></td> <tr style="color:green;border-top:1px solid #000">
</tr> <th scope="row" style="padding-top:10px;">
</table> <strong>${_("Total")}</strong>
</th>
<td style="padding-top:10px;">
<strong>${modes['total']}</strong>
</td>
</tr>
</table>
%elif section_data.get('enrollment_message'): %elif section_data.get('enrollment_message'):
<p>${section_data['enrollment_message']}</p> <p>${section_data['enrollment_message']}</p>
%endif %endif
......
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