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):
# Verify that the correct banner color is rendered
self.assertContains(
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
......
......@@ -59,10 +59,9 @@ from util.course import get_link_for_about_page, get_encoded_course_sharing_utm_
lang="${course_overview.language}"
% 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)]) %>
<section class="details" aria-labelledby="details-heading-${course_overview.number}">
<h2 class="hd hd-2 sr" id="details-heading-${course_overview.number}">${_('Course details')}</h2>
<div class="details">
<div class="wrapper-course-image" aria-hidden="true">
% if show_courseware_link:
% if not is_course_blocked:
......@@ -90,7 +89,7 @@ from util.course import get_link_for_about_page, get_encoded_course_sharing_utm_
% endif
</div>
<div class="wrapper-course-details">
<h3 class="course-title">
<h3 class="course-title" id="course-title-${enrollment.course_id}">
% if show_courseware_link:
% if not is_course_blocked:
<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_
</div>
</div>
</div>
</section>
</div>
<footer class="wrapper-messages-primary">
<div class="messages-list">
% if related_programs:
......@@ -411,7 +410,7 @@ from util.course import get_link_for_about_page, get_encoded_course_sharing_utm_
% endif
</div>
</footer>
</article>
</div>
</div>
</li>
<script>
......
......@@ -6,5 +6,3 @@ from django.utils.translation import ugettext as _
<header class="wrapper-header-courses">
<h2 class="header-courses">${_("My Courses")}</h2>
</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