Commit 4e32bd5a by christopher lee

Fix aria label for course details on the course dashboard

parent 52e0ab92
...@@ -371,7 +371,8 @@ class TestCourseVerificationStatus(UrlResetMixin, ModuleStoreTestCase): ...@@ -371,7 +371,8 @@ class TestCourseVerificationStatus(UrlResetMixin, ModuleStoreTestCase):
# Verify that the correct banner color is rendered # Verify that the correct banner color is rendered
self.assertContains( self.assertContains(
response, response,
"<article class=\"course {}\">".format(self.MODE_CLASSES[status]) "<div class=\"course {}\" aria-labelledby=\"course-title-{}\">".format(
self.MODE_CLASSES[status], self.course.id)
) )
# Verify that the correct copy is rendered on the dashboard # Verify that the correct copy is rendered on the dashboard
......
...@@ -59,10 +59,9 @@ from util.course import get_link_for_about_page, get_encoded_course_sharing_utm_ ...@@ -59,10 +59,9 @@ from util.course import get_link_for_about_page, get_encoded_course_sharing_utm_
lang="${course_overview.language}" lang="${course_overview.language}"
% endif % endif
> >
<article class="course${mode_class}"> <div class="course${mode_class}" aria-labelledby="course-title-${enrollment.course_id}">
<% course_target = reverse(course_home_url_name(course_overview.id), args=[unicode(course_overview.id)]) %> <% course_target = reverse(course_home_url_name(course_overview.id), args=[unicode(course_overview.id)]) %>
<section class="details" aria-labelledby="details-heading-${course_overview.number}"> <div class="details">
<h2 class="hd hd-2 sr" id="details-heading-${course_overview.number}">${_('Course details')}</h2>
<div class="wrapper-course-image" aria-hidden="true"> <div class="wrapper-course-image" aria-hidden="true">
% if show_courseware_link: % if show_courseware_link:
% if not is_course_blocked: % if not is_course_blocked:
...@@ -90,7 +89,7 @@ from util.course import get_link_for_about_page, get_encoded_course_sharing_utm_ ...@@ -90,7 +89,7 @@ from util.course import get_link_for_about_page, get_encoded_course_sharing_utm_
% endif % endif
</div> </div>
<div class="wrapper-course-details"> <div class="wrapper-course-details">
<h3 class="course-title"> <h3 class="course-title" id="course-title-${enrollment.course_id}">
% if show_courseware_link: % if show_courseware_link:
% if not is_course_blocked: % if not is_course_blocked:
<a data-course-key="${enrollment.course_id}" href="${course_target}">${course_overview.display_name_with_default}</a> <a data-course-key="${enrollment.course_id}" href="${course_target}">${course_overview.display_name_with_default}</a>
...@@ -264,7 +263,7 @@ from util.course import get_link_for_about_page, get_encoded_course_sharing_utm_ ...@@ -264,7 +263,7 @@ from util.course import get_link_for_about_page, get_encoded_course_sharing_utm_
</div> </div>
</div> </div>
</div> </div>
</section> </div>
<footer class="wrapper-messages-primary"> <footer class="wrapper-messages-primary">
<div class="messages-list"> <div class="messages-list">
% if related_programs: % if related_programs:
...@@ -411,7 +410,7 @@ from util.course import get_link_for_about_page, get_encoded_course_sharing_utm_ ...@@ -411,7 +410,7 @@ from util.course import get_link_for_about_page, get_encoded_course_sharing_utm_
% endif % endif
</div> </div>
</footer> </footer>
</article> </div>
</div> </div>
</li> </li>
<script> <script>
......
...@@ -6,5 +6,3 @@ from django.utils.translation import ugettext as _ ...@@ -6,5 +6,3 @@ from django.utils.translation import ugettext as _
<header class="wrapper-header-courses"> <header class="wrapper-header-courses">
<h2 class="header-courses">${_("My Courses")}</h2> <h2 class="header-courses">${_("My Courses")}</h2>
</header> </header>
<h2 class="hd hd-2 sr" id="courses-tab">${_('My Courses')}</h2>
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